Closed homburg closed 10 months ago
Actually seems like an issue that appScheme
for the QR code is generated from the slug
value instead of scheme
value(s) compared to this: https://github.com/expo/expo-github-action/issues/214#issuecomment-1599383864 unless I'm misunderstanding @byCedric
Hi @homburg! Thanks for creating this issue. There seems to be some confusion around the slug, schemes, and how they relate to the QR codes from expo/expo-github-action/preview
.
expo-github-action
can create two types of QR codes, for expo-go
, or dev-build
(dev clients) -- we create these URLs here
getVariables
method of the expo/expo-github-action/preview
code hereexpo-dev-client
package has a plugin that adds a specific exp+<slug>
, as scheme, to your project (see plugin code).
slug
config option, and not the scheme
property.One thing that seems to be missing or incorrect, is that the plugin removes specific characters from this generated exp+<slug>
scheme (here). I think this is affecting you right now.
To answer this question:
Actually seems like an issue that
appScheme
for the QR code is generated from theslug
value instead ofscheme
value(s) compared to this: https://github.com/expo/expo-github-action/issues/214#issuecomment-1599383864 unless I'm misunderstanding @byCedric
Yep, that's correct, because the expo-dev-client
plugin uses the slug
for the generated exp+helloworld
scheme in your Android manifest. I know it's a bit confusing 🙈
I'll release a patch version soon for v8
that fixes this
:tada: This issue has been resolved in version 8.2.1 :tada:
The release is available on:
8.2.1
Your semantic-release bot :package::rocket:
Let me know if this doesn't fix your issue @homburg! 😄 If you are using expo/expo-github-action/preview@v8
, you can just rerun everything. The tag has been updated.
Thanks @byCedric that fixes my QR codes!
And thanks for the great explanation. Makes sense that dev-client scheme is independent of scheme
config (by using the app slug)
Awesome, glad we could resolve it fast. And again, sorry for the confusing property names.
Description of the bug
If you have underscores in your app slug and are using
expo-dev-client
builds, the pr preview QR codes will not work.To Reproduce
Expected behavior
Expected the installed dev-client app to load the update from the QR code
Actual behavior
Received a system error message, (paraphrased): "No apps are registered for this url"
Additional context
As seen in this example pull-request: https://github.com/homburg/HelloExpo/pull/1:
The app with app slug:
hello_expo
generates an url scheme registration inAndroidManifest.xml
as<data android:scheme="exp+helloexpo"/>
(without underscore).The preview action generates a qr code with the
appScheme
query variable set verbatim from theslug
config value.The mismatch between registered scheme and QR code scheme results in an error.