question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

this.requestAnimationFrame is not a function appears when going in and out of fullscreen mode

See original GitHub issue

I have gone through these following points

Issue Description

When playing a video in our app and we go in and out of fullscreen mode the simulator throws the error this.requestAnimationFrame is not a function When using a prior version of native-base (2.13.12) this bug did not exist in our app. Once we upgraded to native-base version 2.13.13, the bug started to appear.

We’ve forked the Native-base repo and implemented the following workaround in the node_modules/native-base/src/basic/Tabs/index.js file:

Screen Shot 2020-07-29 at 3 09 21 PM

And in the node_modules/native-base/dist/src/basic/Tabs/index.js file:

Screen Shot 2020-07-29 at 3 14 27 PM

node, npm, react-native, react and native-base version, expo version if used, xcode version

node: 10.15.3 react-native: 0.60.0 react: 16.8.6 native-base: 2.13.13 xcode: 11.1 (11A1027)

Expected behaviour

Should not throw an error when going in and out of fullscreen mode

Actual behaviour

throws an error when going in and out of fullscreen mode Screen Shot 2020-07-29 at 2 58 57 PM

Steps to reproduce

Launch app and play a video Then click fullscreen button to play video in fullscreen mode

Is the bug present in both iOS and Android or in any one of them?

Yes, bug is present in iOS and Android.

Any other additional info which would help us debug the issue quicker.

###Important

If you want your issue to be looked at quicker, attach a snack reproducible with your issue. Makes it easier for us!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:11
  • Comments:40

github_iconTop GitHub Comments

10reactions
elilambnzcommented, Sep 14, 2020

@tejparekh if you don’t want to mess around with manually changing files, you could temporarily import @dgeorgiev’s handy PR into npm in place of native-base: "native-base": "Healthyco/NativeBase#feature/fix-request-animation"

Or npm i/yarn add Healthyco/NativeBase#feature/fix-request-animation

Just remember to subscribe to PR #3218 changes and revert back to importing native-base once it’s merged in.

8reactions
dgeorgievcommented, Aug 18, 2020

Hey, pushed a PR with a fix for this https://github.com/GeekyAnts/NativeBase/pull/3218

Read more comments on GitHub >

github_iconTop Results From Across the Web

RequestAnimationFrame not working when exiting fullscreen ...
go back to the space where the original safari was, which is showing "click to exit fullscreen mode", click anywhere, you get out...
Read more >
SDL port - how to use SDL_SetWindowFullscreen properly?
My engine uses requestAnimationFrame via emscripten_set_main_loop, and inside it calls SDL_PollEvent() to get events for mouse presses and everything else. So ...
Read more >
Stop Using setInterval. Use requestAnimationFrame
requestAnimationFrame is a method in JavaScript that takes one single argument which is a function to run. That function you pass to ...
Read more >
467617 - How to dramatically improve Chrome's ... - Monorail
Chrome attempts to wake up requestAnimationFrame() animations at vsync intervals ... the function does not enter a wait state if the object is...
Read more >
Source: player.js - Brightcove APIs
'function') { throw new Error(`plugin "${name}" does not exist`); } }); } /* * Store ... mode or tell the player that it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found