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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In debug it works but in production the alert box does not appear on Android #44

Open
cinzianicoletti opened this issue May 25, 2020 · 4 comments

Comments

@cinzianicoletti
Copy link

I have this abnormal problem. When I compile the application in debug mode everything works in the correct mode. The moment I create the apk and publish it for online tests, the alert to activate the GPS no longer appears. Anyone know what it is?
Here the specifications:

  React Native Environment Info:
    System:
      OS: macOS 10.15.4
      CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
      Memory: 74.91 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 13.8.0 - /usr/local/bin/node
      Yarn: 1.22.0 - ~/.yarn/bin/yarn
      npm: 6.13.7 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    IDEs:
      Android Studio: 3.6 AI-192.7142.36.36.6392135
      Xcode: 11.3.1/11C505 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3 
      react-native: 0.59.8 => 0.59.8 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native: 0.61.5

I thank in advance who will want to help me.

@Richou
Copy link
Owner

Richou commented May 25, 2020

Thanks for the issue, I will check it asap.

@cinzianicoletti cinzianicoletti changed the title In debug it works but in production the alert box does not appear In debug it works but in production the alert box does not appear in Android May 27, 2020
@cinzianicoletti cinzianicoletti changed the title In debug it works but in production the alert box does not appear in Android In debug it works but in production the alert box does not appear on Android May 27, 2020
@felansu
Copy link

felansu commented Jul 21, 2020

Same for me:

System:
OS: macOS 10.15.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 631.12 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.16.1 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.6 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 23, 25, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 29.0.3
System Images: android-22 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6626763
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
react: ^16.13.1 => 16.13.1
react-native: ^0.62.2 => 0.62.2
npmGlobalPackages:
react-native: 0.61.5

@felansu
Copy link

felansu commented Jul 24, 2020

#43

@theInfiTualEr
Copy link

check this out: facebook/react-native#10009 (comment)

try setTimeout or a delay function before trying to access the Android API.

const delay = ms => new Promise(res => setTimeout(res, ms));
await delay(5000);

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

No branches or pull requests

4 participants