Giter Site home page Giter Site logo

Comments (4)

jkasten2 avatar jkasten2 commented on May 23, 2024

@duyluandethuong Can you get the full stack trace from the logcat of the device?

from react-native-onesignal.

duyluandethuong avatar duyluandethuong commented on May 23, 2024

Here it is

04-29 12:02:21.099 21401-21491/com.trgapp W/EGL_emulation: eglSurfaceAttrib not implemented
04-29 12:02:21.099 21401-21491/com.trgapp W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa1da6d20, error=EGL_SUCCESS

                                                        --------- beginning of system

04-29 12:02:21.652 21401-28811/com.trgapp I/ReactNativeJS: 'networkStatus when load TRG Internal', ''
04-29 12:02:21.654 21401-28811/com.trgapp I/ReactNativeJS: Running application "TRGApp" with appParams: {"initialProps":{},"rootTag":1}. DEV === true, development-level warning are ON, performance optimizations are OFF
04-29 12:02:21.870 21401-28811/com.trgapp I/ReactNativeJS: 'networkStatus when running utils', 'NONE'
04-29 12:02:21.873 21401-28812/com.trgapp D/debug: User:2ff8d03f-233d-4ecf-a981-8929ba123131
04-29 12:02:21.873 21401-28812/com.trgapp D/debug: registrationId:APA91bFQd0y7UlQZxTMFpQYG1mmHndZiwIPdJyqTVTyMq7f0ZFsnhk-ON_pAT746MBYq_fr4gEKmDEbc-QmqSJ_acGIWbqBSqGyWcHDDoj9_xngtxMcNhgE
04-29 12:02:21.875 21401-28811/com.trgapp I/ReactNativeJS: 'id Available', { pushToken: 'APA91bFQd0y7UlQZxTMFpQYG1mmHndZiwIPdJyqTVTyMq7f0ZFsnhk-ON_pAT746MBYq_fr4gEKmDEbc-QmqSJ_acGIWbqBSqGyWcHDDoj9_xngtxMcNhgE',
userId: '2ff8d03f-233d-4ecf-a981-8929ba123131' }
04-29 12:02:21.885 21401-28811/com.trgapp E/ReactNativeJS: Network request failed
04-29 12:02:21.923 21401-21491/com.trgapp W/EGL_emulation: eglSurfaceAttrib not implemented
04-29 12:02:21.923 21401-21491/com.trgapp W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa1ec5900, error=EGL_SUCCESS

from react-native-onesignal.

duyluandethuong avatar duyluandethuong commented on May 23, 2024

Hi,

The problem seems to be fixed by modifying the index.js file in node_modules/react-native-onesignal. Change the idsAvailable methods to the following. Remeber to add NetInfo to your react dependencies:

Notifications.idsAvailable = function(idsAvailable) {
    NetInfo.isConnected.fetch().then(isConnected => {
        if (isConnected == true) {
            RNOneSignal.idsAvailable(idsAvailable);
        }
        else {
            return;
        }
    });
}

from react-native-onesignal.

avishayil avatar avishayil commented on May 23, 2024

Hi, Thanks for the report and the solution.
I'll add this to the next release.

from react-native-onesignal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.