When attempting to run a simple Android Instant App, I receive this error in the console and the app does not open. What does this error mean and how do I pass in a valid credential header?
-
This should no longer be an issue with the latest emulator versions. I am now able to run Instant Apps on, including but not limited to, emulators N5X from M-O, and Pixel N-O – Prags Oct 26 '17 at 09:53
4 Answers
There's a known issue where emulators are not allowed to talk to the Instant Apps backend, resulting in this error. If you try to use the emulator to launch a published instant app, it'll fail for this reason. We've also seen it on some physical devices, but it's very inconsistent there.
When running an instant app locally, you may still see this error, but it's not the root cause. The loader tries to fall back to the backend if something goes wrong with the local launch. So hopefully there's something further up indicating what went wrong initially.
A change has been submitted to skip the fallback for emulators, to reduce that noise, and that'll be in an upcoming SDK release.

- 3,580
- 3
- 29
- 40
-
-
Not a public one. We can do that though. If you don't see one from us shortly, please feel free to file one. – philo Oct 18 '17 at 01:24
-
Thank you. I think the people of SO would like one if you can sort one! <3 – dazza5000 Oct 18 '17 at 01:32
Clean build the project and try again. I did get the same error but got rid of it after clean build.

- 101
- 6
This error can be due to a variety of things and means that your device is not able to run Instant Apps for one reason or another. For example, your device is in a country that is not currently launched (available countries).
I would recommend using the emulator by following the instructions here, as this is a debug device, Studio is able to send override flags to the emulator to ensure Instant Apps will run.

- 21,199
- 5
- 42
- 58
I (brutally) solved with a clean boot: Tools/AVD Manager/Virtual Devices/Down-arrow on the line of the selected emulator/Cool Boot.

- 91
- 6