Creating App Actions may come with some issues with the setup or with the test tool. Let’s see the description of some commonly encountered errors and how we can troubleshoot them.
Error: “No App found to open URL” in a toast notification
Make sure that the urlTemplate in the actions.xml file is configured correctly. Use the manual triggering of your URL by ACTION_VIEW and the URL, if you are using App Links URLs. But if using intent-based URLs, then make sure your Activity is configured correctly so that you can use the provided parameters.
Error: “App isn’t installed”
When the <intent-filter> in your AndroidManifest.xml file does not filter the deep link which is specified in your actions.xml then you will get the “App isn’t installed” error. Check it first before going to file a bug.
Error: “An entity set reference containing neither an entity set ID nor a URL filter was found” in Android Studio
This error occurred by a linter issue for the <entity-set-reference> tag. Ignore this message and disable the lint check for this tag by adding an attribute to it i.e., tools:ignore=”ValidActionsXml”.
See the following example of an entity set where a lint check is disabled:
<entity-set-reference entitySetId=”example” tools:ignore=”ValidActionsXml” />
Error: “Invalid location” while uploading APK
Use tools like ProGuard to avoid resource files so that you do not get invalid location issues else using optimization or obfuscation tool may affect the resources of APK release.
This issue can be resolved by disabling the tool used for your app’s actions.xml file.
Error: “An active APK or Android Bundle contains an actions.xml file. In order to continue, accept the Actions on Google Terms of Service” in Google Play Console
While you are creating an app release in the Play Console, you may observe the above error. Follow the steps below to accept the Actions on Google Terms of Service:
1. Go to Play Console and select your app.
2. Navigate to Setup and go to Advanced Settings.
3. Click the Actions on Google tab.
4. Check the box Integrate my services with App Actions using Actions on Google, and then follow the instructions.
The “Accept” button is disabled on the Play Terms of Service form.
The Accept button is disabled for the signed-in user who does not have the required access to the terms of service. You need to do the first submission by the administrator of the Play Console profile.
App Actions test tool
Update the installation of the App Actions test tool to the recent version before fixing any of the App Actions issues.
The App Actions test tool can’t locate my actions.xml file.
Make sure to add the correct <meta-data> tag in the AndroidManifest.xml file.
My App Action preview and my current actions.xml file don’t match.
The App Action preview does not update itself dynamically when you change your actions.xml file. Every time you change your actions.xml file manually or when you switch build variants in Android Studio, save your actions.xml file and then click Update Review in the test tool.
The App Actions test tool plugin is generating errors or stopped working.
First, update the Android Studio to its latest version. The reason for you getting a 403 error as you might be running the plugin on a package where you don’t have permissions to run the plugin.
If you still see the error, please file a bug to Google by sending the following details:
· Error dialogue details
· Android Studio Logs. Go to Help and click Show Log in Finder. This way you can see the location of the idea.log in your Finder. In the log file, search “Submit Actions Request Body:” and paste the responses of the server.
The App Actions test tool generates errors like UnknownHostException.
The App Actions preview is created by the App Actions test tool which enables you to test Google Assistant integrations with a single Google account. Make sure your internet connection is active and if necessary, give proxy access to Google domains to create previews.
Check these common issues while resolving the network issues when the internet connection is active, and you are using a proxy server on the local network:
· Your proxy may require an access control list (ACL), if it happens, update the ACL to allow this URL pattern:
The Assistant prompts a message saying “Sorry, I couldn’t find that” when the App Action with the test plugin is invoked.
This prompt may appear for different reasons depending on the setup. Try the following steps:
1. Sign in to Android Studio, the Play Console, and your device where you are testing the app, with the same Google account.
2. Start syncing the data by enabling device data syncing.
3. Set the language of your device and Google Assistant to en-US.
4. Check if the package name of the application in the Google Play Console and the package in the test application are the same.
5. In the fulfillment urlTemplate definition in your actions.xml, make sure that the values of android:host and android:scheme match with the declared values in the AndroidManifest file.
6. Remove previous installations of your app from the test device and install a fresh build to avoid multiple generated files.
7. Delete the previous preview from the App Actions test tool and create a new preview.
8. Check in the Logcat tool for fulfillment related failures for Google Assistant, there you can see an intent launched to your app.
9. Enable the settings of “App info for your devices” for the account.
10. Open Google Assistant and complete the setup. Make sure it is completed by the blue-colored progress bar that appears on the bottom screen, in some cases it may look different.
11. Make sure that the invocation and the preview created by the App Actions test tool have the same name when using Google Assistant to trigger an App Action.
12. To avoid transcription errors, try to use text input instead of voice.
13. Make sure that the applicationId and APK or AAB match to the Google Play Console. This can be done by configuring your test build.
14. Configure your preview so that you get a unique invocation name to use that reduces the collision chances with other apps.
15. When you are troubleshooting a shareable codebase, try running a sample app called Actions Fitness App and make sure it works end-to-end. Add additional features to this sample app to see if you can replicate the issues.
16. If you are using G Suite accounts, ensure that Google Assistant is turned on by the administrator. But we recommend you create a non-G Suite test account and set it up as a licensed tester through Play Store. This account is used for testers to create previews for their app and test the account on their own device.
17. If you downloaded Google Assistant as a separate app, force stop it on your device through your phone settings.
18. Raise your issue in the App Action issue tracker if none of these steps worked.
If you are building an iOS app, make sure to check How to Troubleshoot iOS Apps.