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

Uncaught Error: Unknown (iOS Simulator) #413

Open
phen0menon opened this issue Nov 9, 2021 · 3 comments
Open

Uncaught Error: Unknown (iOS Simulator) #413

phen0menon opened this issue Nov 9, 2021 · 3 comments

Comments

@phen0menon
Copy link

phen0menon commented Nov 9, 2021

Describe the bug
Getting critical error on iOS simulator when subscribing to accelerometer. The error can be hidden. But it appears every time you start the emulator, which is terribly inconvenient. It also produces an error in the console:

 ERROR  Sensor accelerometer is not available

telegram-cloud-photo-size-2-5212925884921657907-x

To Reproduce
Steps to reproduce the behavior:

  1. Install latest version of react-native-sensors (7.3.3)
  2. Run iOS app on simulator (tested on 15.0)

Expected behavior
Display the simulator error only in the console

Desktop (please complete the following information):

  • React Native Version: 0.64.1
  • Device iOS Simulator (iOS 15.0)
  • Version 7.3.3
@grgmgd
Copy link

grgmgd commented Nov 18, 2021

I solved mine by catching the error using RxJs

  const subscriber = accelerometer.subscribe(
    (changes) => {
      console.log(changes)
    },
    (err) => {
      console.log(err);
    }
  );

@stale
Copy link

stale bot commented Jan 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 8, 2022
@DenysLopatynskyiB
Copy link

DenysLopatynskyiB commented Jun 13, 2022

+1 to this.
Once you call accelerometer.subscribe you get the error

"react-native-sensors": "^7.3.5",

Simulator Screen Shot - iPhone 13 - 2022-06-13 at 16 57 07

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

3 participants