Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

712
Views
Android app crashes after integrating React Native with NoClassDefFoundError: com.facebook.react.bridge.JSPackagerWebSocketClient

I integrated React Native into an existing Android project. The code compiles fine, but when I get to the part of my app that initializes React Native, the app crashes.

Relevant part of the backtrace:

java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be created
      Caused by: java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be created
        at com.facebook.react.devsupport.DevSupportManagerFactory.create(DevSupportManagerFactory.java:77)
      Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Constructor.newInstance(Native Method)
        at com.facebook.react.devsupport.DevSupportManagerFactory.create(DevSupportManagerFactory.java:70)
      Caused by: java.lang.NoClassDefFoundError: com.facebook.react.bridge.JSPackagerWebSocketClient
        at com.facebook.react.devsupport.DevServerHelper.<init>(DevServerHelper.java:108)
        at com.facebook.react.devsupport.DevSupportManagerImpl.<init>(DevSupportManagerImpl.java:141)

The key part is

java.lang.NoClassDefFoundError: com.facebook.react.bridge.JSPackagerWebSocketClient.

I'm not sure why this class wouldn't be found. The location where this crash happens in the React Native source code is here.

UPDATE: If it's relevant, I was getting compile-time errors before this that I fixed with the solution here (which excludes okhttp-ws) which I wonder may be causing this.

UPDATE 2: I'm starting to think this is related to excluding okhttp-ws since I noticed in JSPackagerWebSocketClient.java there are imports such as:

import okhttp3.ws.WebSocket;

So I guess the real question is what is the real fix for the original issue I was having, which is:

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: okhttp3/internal/ws/RealWebSocket$1.class

I'm using React Native v0.31.0.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I get that error sometimes when I previously had "Debug JS Remotely" enabled, in the debug menu, when I run my project.

First, close the previous web browser tab that the app was connected to, and then in the app dismiss the error then disable "Debug JS Remotely" and reload.

This is 1 solution to my described common JSPackagerWebSocketClient error, but I am unsure of all your conditions around your issue though, such as your integration process, your android configs, how you ran the app, or maybe it's an issue with an older RN version.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!