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

[BUG] crash on iOS with new arch #48

Closed
chriszs opened this issue Jun 12, 2024 · 2 comments
Closed

[BUG] crash on iOS with new arch #48

chriszs opened this issue Jun 12, 2024 · 2 comments
Labels
Groomed JWP team has reviewed the ticket and deemed it necessary

Comments

@chriszs
Copy link
Contributor

chriszs commented Jun 12, 2024

Describe the bug
App crashes with Attempted to dereference null pointer. when new arch/bridgeless is enabled and JWPlayer is viewed.

The crash appears to be in a string length check called indirectly by parseExportedMethods with a method selector of setUpCastController, a method signature of nil and a return type of v (void?), when attempting to call the signature. See below for screenshot.

If I had to guess, this may be because the cast methods are conditionally defined by #if USE_GOOGLE_CAST but the exported React Native method signatures may not be.

To Reproduce
Steps to reproduce the behavior:

  1. Setup an app with JWPlayer, but don't enable Google Cast support
  2. Enable new arch
  3. Try to view a screen with JWPlayer on it

Expected behavior
No crash.

Screenshots / Visual evidence
Screenshot 2024-06-12 at 2 11 54 AM

Error occurs during a call on line 126 in the screenshot above.

@chriszs chriszs added the needs-grooming Has not been reviewed by codeowners for scope/validation label Jun 12, 2024
@Jmilham21
Copy link
Collaborator

Hey @chriszs, I'll be on PTO from today until the end of the month. The rest of my team is aware of this and will look into it. I'm just giving you a heads-up if you don't see any motion for a bit.

This may become a larger issue as supporting the architecture will require some major refactoring of our classes (or at least that was my understanding the last time I read through the docs).

@chriszs
Copy link
Contributor Author

chriszs commented Jun 13, 2024

@Jmilham21 That may no longer be the case with the Interop Layer, which in some cases requires almost no changes at all (see this five line change to enable it for Auth0, for instance), and those docs have evolved a ton, but I haven't yet confirmed that for JWPlayer. For me, this is not a priority, because in order to enable new arch multiple third party libraries would have to fix issues. But new arch will be the default when scaffolding new projects in the next major release of React Native (release date: TBA), and I suspect this particular crash could be relatively straightforward to address (though there can always be unforeseen complications).

chriszs added a commit to chriszs/jwplayer-react-native that referenced this issue Jul 21, 2024
chriszs added a commit to chriszs/jwplayer-react-native that referenced this issue Jul 21, 2024
@AmitaiB AmitaiB added Groomed JWP team has reviewed the ticket and deemed it necessary and removed needs-grooming Has not been reviewed by codeowners for scope/validation labels Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Groomed JWP team has reviewed the ticket and deemed it necessary
Projects
None yet
Development

No branches or pull requests

3 participants