Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth-session leads to app refresh on Android 11 #8117

Closed
mschipperheyn opened this issue May 1, 2020 · 7 comments
Closed

Auth-session leads to app refresh on Android 11 #8117

mschipperheyn opened this issue May 1, 2020 · 7 comments

Comments

@mschipperheyn
Copy link

mschipperheyn commented May 1, 2020

馃悰 Bug Report

I'm suddenly seeing app refresh after expo-auth-session after adding a new emulator based on:
Pixel 3a XL
Android API R x86

Seems similar to: #8117

Environment

Expo CLI 3.20.0 environment info:
System:
OS: macOS Mojave 10.14.6
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
Yarn: 1.22.4 - ~/.nvm/versions/node/v12.16.1/bin/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v12.16.1/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
expo: ^37.0.8 => 37.0.8
react: 16.9.0 => 16.9.0
react-dom: 16.9.0 => 16.9.0
react-native: 0.61.4 => 0.61.4
npmGlobalPackages:
expo-cli: 3.20.0

Android Emulator
Managed Expo workflow
Pixel 3a XL
Android API R x86

Steps to Reproduce

I don't see this behaviour on my other emulators (e.g. Pixel 2), so I'm assuming it's related to the emulator.

Expected Behavior

The oauth process should return to the emulator

Actual Behavior

It seems to open a new emulator window.

Reproducible Demo

Can't comment to how reproducible this is. I would so, give this specific emulator and Android config a go.

@cruzach cruzach changed the title Auth-session leads to app refresh Auth-session leads to app refresh on Android 11 May 11, 2020
@cruzach
Copy link
Contributor

cruzach commented May 11, 2020

Can you provide a snack or code sample we can use to test the emulator?

@EvanBacon EvanBacon self-assigned this May 22, 2020
@EvanBacon
Copy link
Contributor

I've tried a bunch of different things and cannot reproduce this error. Closing for now. Feel free to reopen if you find a reliable way to reproduce the error.

@arnaud-zg
Copy link

I can reproduce the bug when the application is published on a channel, for example expo publish --release-channel staging. I think this PR #7687 might fix it, but it seems expo-auth-session@1.3.1 is not compatible with expo@37.x.x.

@brentvatne
Copy link
Member

from that thread @arnaud-zg:

this is available in expo-auth-session@1.0.1

@arnaud-zg
Copy link

arnaud-zg commented Jun 1, 2020

from that thread @arnaud-zg:

this is available in expo-auth-session@1.0.1

Thanks @brentvatne, I'm currently using AuthSession.useAuthRequest, I guess it was introduced recently, so I need to use AuthSession.startAsync.

@brentvatne
Copy link
Member

brentvatne commented Jun 1, 2020

that should work as expected there as well - it works for me on https://github.com/brentvatne/hour-power - you can verify yourself by scanning the qr code at https://expo.io/@notbrent/hour-power?release-channel=lol and looking at the related code in the repo. (https://github.com/brentvatne/hour-power/blob/master/app/hooks/useSpotifyAuth.ts)

if you can provide a https://stackoverflow.com/help/mcve and open a new issue we can look into it more!

@arnaud-zg
Copy link

arnaud-zg commented Jun 4, 2020

Hey, I tried to reproduce the issue on a new project, but I can't. So maybe the problem comes from my app configuration (app.json).

After some publications and tests; I found the issue come from the expo client. On my home screen
I've created a shortcut of my app with the pin button. I guess the link wasn't valid anymore, I've deleted it and create a new shortcut. Now it works. 馃コ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants