Skip to content

[Android] Rotating screens makes app restart to initial scrren #14971

Closed
@andreecosta

Description

@andreecosta

Is this a bug report?

Yes

Have you read the Bugs section of the Contributing to React Native Guide?

Yes

Environment

  1. react-native -v: 0.46.0
  2. node -v: 7.9.0
  3. npm -v: 4.2.0

Then, specify:

  1. Target Platform (e.g. iOS, Android): Android
  2. Development Operating System (e.g. macOS Sierra, Windows 10): macOS Sierra
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): not relevant

Steps to Reproduce

(Write your steps here:)

  1. NPM install orientation package, and create a swiper with some images
  2. Then, click one of those images to open in landscape mode, by locking the screen with orientation package
  3. The image opens in a modal, with another swiper inside it

Expected Behavior

It should open the image in landscape mode.

Actual Behavior

When I click the image, the app resets to initial screen...
You can see it here:
https://vid.me/JHrFH

All I get is this error on Android Studio:
Receiver not registered: com.github.yamill.orientation.OrientationModule$1@5f236ab

And this one on console when debugging:
Trying to remove a child that doesn't exist

On iOS it works perfectly fine.

One more test: https://vid.me/yScfg

Reproducible Demo

I've tried making a reproducible demo but it actually worked. But on my app it's not working, and I really don't know why.

Demo worked like this:
https://vid.me/BkgUX

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions