snack icon indicating copy to clipboard operation
snack copied to clipboard

Deep linking / AuthSessions don't function - "Can't make a deep link into a standalone app with no custom scheme defined"

Open dylmye opened this issue 3 years ago • 7 comments

Summary

Expo Snack features that use deep linking like AuthSessions cause Snack to throw the following error when previewing on Android and iOS: image

Can't make a deep link into a standalone app with no custom scheme defined

This issue also occurs when opening the example on a device through the Expo Go app's project section, but not when running the same code in a newly created expo app on a computer.

What platform(s) does this occur on?

Android, iOS

SDK Version

40

Reproducible demo or steps to reproduce from a blank project

https://snack.expo.io/@dylmye/reddit-auth-code - the result of clicking on the snack button from here

https://snack.expo.io/@dylmye/authsession-case-issue - one I made myself with a app.json with a schema defined

dylmye avatar Apr 11 '21 01:04 dylmye

We've also seen this in Expo SDK 44. It comes from https://github.com/expo/expo/blob/35f78160a9ec1758ca73eb9e079a1c278c9b1bb1/packages/expo-linking/src/Schemes.ts#L125 - but still trying to figure out what and why it happens.

Seems like the scheme property in some cases is undefined https://github.com/expo/expo/blob/e7f227977ff7aaadbabe8f0128c4f68a52462b06/packages/expo-auth-session/src/tests/SessionUrlProvider-test.ts#L152

kennethlynne avatar Jan 20 '22 13:01 kennethlynne

Is there any progress on this issue? I'm facing this on expo SDK 41 after I updated the SDK from 40 to 41

wahas-mughal avatar Jan 25 '22 11:01 wahas-mughal

Running into this now. Seems like a pretty big issue as we can't bundle our app with linking unless this is fixed

dlombardi avatar Feb 08 '22 23:02 dlombardi

Running into this now. Seems like a pretty big issue as we can't bundle our app with linking unless this is fixed

Hello have you been able to fix this?

ceafive avatar Jun 08 '22 22:06 ceafive

Also stuck on this, though I'm attempting to build a staging configuration locally to troubleshoot something. Not sure if that's correct to do even.

ladyshaitan avatar Aug 22 '22 22:08 ladyshaitan

Stuck on this aswell. Any solutions?

tirilfjell avatar Aug 25 '22 10:08 tirilfjell

cc @byCedric

dylmye avatar Aug 25 '22 16:08 dylmye

I found a solution https://reactnavigation.org/docs/deep-linking/#setup-with-expo-projects

ErnestMironov avatar Oct 24 '22 07:10 ErnestMironov

I am trying to implement AuthSession in snack but it gives me the same error. In the local setup the same code works well.

AasthaSharma-git avatar Nov 22 '22 13:11 AasthaSharma-git

unrelated, i was getting the issue while starting up the app the app was crashing. for me the issue was the scheme and my android package name were differrent. once i fixed them. it worked.

rpatidar avatar Dec 06 '22 15:12 rpatidar

I'm getting this error only after eas building and uploading to the Play Store. when I download and launch the app it crashes. with the message "cannot deep link into standalone app with no scheme defined", but everything works fine in expo go.

fedIce avatar Jul 16 '23 06:07 fedIce

unrelated, i was getting the issue while starting up the app the app was crashing. for me the issue was the scheme and my android package name were differrent. once i fixed them. it worked.

I have exactly the same error. can you explain how to do this, please?

kasaiee avatar Oct 12 '23 09:10 kasaiee

unrelated, i was getting the issue while starting up the app the app was crashing. for me the issue was the scheme and my android package name were differrent. once i fixed them. it worked.

I'm just curious how this could possibly be a solution? My understanding is that package name does NOT have to be the same as the scheme. Unless I am wrong here?

Seeing this issue on iOS, Expo SDK 50.

mercpls avatar Feb 23 '24 14:02 mercpls

I am not sure if this will help anyone else but we had a bug that closely resembled this issue with the consistent error was

Cannot make a deep link into a standalone app with no custom scheme defined

Even though a scheme was defined. The problem was caused by importing and calling react-navigation libraries while also using expo-router. For us, it was easier to remove expo-router but as long as the correct libraries are called in conjunction with each other, this may someone else.

TomHiller-swd avatar Mar 29 '24 13:03 TomHiller-swd

react-navigation

unrelated, i was getting the issue while starting up the app the app was crashing. for me the issue was the scheme and my android package name were differrent. once i fixed them. it worked.

I have exactly the same error. can you explain how to do this, please?

hi, same here. did you fix it at last?

hanyaonian avatar May 13 '24 17:05 hanyaonian