SDKBOX crash on Cocos Creator [2.1.3]

SDKBOX crash on Cocos Creator [2.1.3]
0

Hello, I am trying to use OneSignal on Cocos Creator 2.1.3
I have no problems creating the apk, and without sdk box it works fine. However, after using sdkbox it crashes.
Logcat:

I/ActivityManager(  482): Start proc com.Ambesek.InfiniteDungeon for activity com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity: pid=11014 uid=10041 gids={50041, 3003}
D/Cocos2dxActivity(11014): Cocos2dxActivity onCreate: org.cocos2dx.javascript.AppActivity@4a7ac474, savedInstanceState: null
D/dalvikvm(11014): Trying to load lib /data/app-lib/com.Ambesek.InfiniteDungeon-1/libcocos2djs.so 0x94f564d8
D/dalvikvm(11014): Added shared lib /data/app-lib/com.Ambesek.InfiniteDungeon-1/libcocos2djs.so 0x94f564d8
D/main    (11014): cocos_jni_env_init
W/System.err(11014):    at org.cocos2dx.javascript.SDKWrapper.loadSDKClass(Unknown Source)
W/System.err(11014):    at org.cocos2dx.javascript.SDKWrapper.setGLSurfaceView(Unknown Source)
W/System.err(11014):    at org.cocos2dx.javascript.AppActivity.onCreateView(Unknown Source)
W/System.err(11014):    at org.cocos2dx.lib.Cocos2dxActivity.addSurfaceView(Unknown Source)
W/System.err(11014):    at org.cocos2dx.lib.Cocos2dxActivity.init(Unknown Source)
W/System.err(11014):    at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Unknown Source)
W/System.err(11014):    at org.cocos2dx.javascript.AppActivity.onCreate(Unknown Source)
E/AndroidRuntime(11014):        at org.cocos2dx.javascript.AppActivity.onCreate(Unknown Source)
W/ActivityManager(  482):   Force finishing activity com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity
I/WindowManager(  482): Screenshot max retries 4 of Token{4a99bc50 ActivityRecord{4a933a30 u0 com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity t21 f}} appWin=Window{4a9dcbcc u0 Starting com.Ambesek.InfiniteDungeon} drawState=4
W/ActivityManager(  482): Activity pause timeout for ActivityRecord{4a933a30 u0 com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity t21 f}

I have followed the procedure with OneSignal, as in: https://docs.sdkbox.com/en/plugins/onesignal/v3-js/
added the app id, and everything. Some solutions for this problem in other topics said to put some lines in AppDelegate.cpp, but even that the Creator already did.

#include "AppDelegate.h"

#include "cocos2d.h"

#include "cocos/scripting/js-bindings/manual/jsb_module_register.hpp"
#include "cocos/scripting/js-bindings/manual/jsb_global.h"
#include "cocos/scripting/js-bindings/jswrapper/SeApi.h"
#include "cocos/scripting/js-bindings/event/EventDispatcher.h"
#include "cocos/scripting/js-bindings/manual/jsb_classtype.hpp"

USING_NS_CC;
#ifdef SDKBOX_ENABLED
#include "PluginOneSignalJS.hpp"
#include "PluginOneSignalJSHelper.h"
#endif

AppDelegate::AppDelegate(int width, int height) : Application("Cocos Game", width, height)
{
}

AppDelegate::~AppDelegate()
{
}

bool AppDelegate::applicationDidFinishLaunching()
{
    se::ScriptEngine* se = se::ScriptEngine::getInstance();

    jsb_set_xxtea_key("df7dbc2a-a630-41");
    jsb_init_file_operation_delegate();

#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)
    // Enable debugger here
    jsb_enable_debugger("0.0.0.0", 6086, false);
#endif

    se->setExceptionCallback([](const char* location, const char* message, const char* stack){
        // Send exception information to server like Tencent Bugly.

    });

    jsb_register_all_modules();
#ifdef SDKBOX_ENABLED
    se->addRegisterCallback(register_all_PluginOneSignalJS);
    se->addRegisterCallback(register_all_PluginOneSignalJS_helper);
#endif

    se->start();

    se::AutoHandleScope hs;
    jsb_run_script("jsb-adapter/jsb-builtin.js");
    jsb_run_script("main.js");

    se->addAfterCleanupHook([](){
        JSBClassType::destroy();
    });

    return true;
}

// This function will be called when the app is inactive. When comes a phone call,it's be invoked too
void AppDelegate::applicationDidEnterBackground()
{
    EventDispatcher::dispatchEnterBackgroundEvent();
}

// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground()
{
    EventDispatcher::dispatchEnterForegroundEvent();
}

I am targeting android-28, using jsb-default.

Thanks for your feedback.

But I cant figure out what happen with your logcat message.

plz show all the logcat message.

Thanks,

I believe that is all. I am using adb logcat | grep cocos to get all from cocos.
In this I opened and it close twice.

I/ActivityManager(  480): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity bnds=[742,174][946,301] (has extras)} from pid 671
I/ActivityManager(  480): Start proc com.Ambesek.InfiniteDungeon for activity com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity: pid=3986 uid=10041 gids={50041, 3003}
D/Cocos2dxActivity( 3986): Cocos2dxActivity onCreate: org.cocos2dx.javascript.AppActivity@4a7a001c, savedInstanceState: null
D/dalvikvm( 3986): Trying to load lib /data/app-lib/com.Ambesek.InfiniteDungeon-1/libcocos2djs.so 0x94f3d6f0
D/dalvikvm( 3986): Added shared lib /data/app-lib/com.Ambesek.InfiniteDungeon-1/libcocos2djs.so 0x94f3d6f0
D/main    ( 3986): cocos_jni_env_init
W/System.err( 3986):    at org.cocos2dx.javascript.SDKWrapper.loadSDKClass(Unknown Source)
W/System.err( 3986):    at org.cocos2dx.javascript.SDKWrapper.setGLSurfaceView(Unknown Source)
W/System.err( 3986):    at org.cocos2dx.javascript.AppActivity.onCreateView(Unknown Source)
W/System.err( 3986):    at org.cocos2dx.lib.Cocos2dxActivity.addSurfaceView(Unknown Source)
W/System.err( 3986):    at org.cocos2dx.lib.Cocos2dxActivity.init(Unknown Source)
W/System.err( 3986):    at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Unknown Source)
W/System.err( 3986):    at org.cocos2dx.javascript.AppActivity.onCreate(Unknown Source)
E/AndroidRuntime( 3986):        at org.cocos2dx.javascript.AppActivity.onCreate(Unknown Source)
W/ActivityManager(  480):   Force finishing activity com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity
W/ActivityManager(  480): Activity pause timeout for ActivityRecord{4a97e01c u0 com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity t7 f}
I/ActivityManager(  480): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity bnds=[742,174][946,301] (has extras)} from pid 671
I/ActivityManager(  480): Start proc com.Ambesek.InfiniteDungeon for activity com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity: pid=4018 uid=10041 gids={50041, 3003}
D/Cocos2dxActivity( 4018): Cocos2dxActivity onCreate: org.cocos2dx.javascript.AppActivity@4a7a07b0, savedInstanceState: null
D/dalvikvm( 4018): Trying to load lib /data/app-lib/com.Ambesek.InfiniteDungeon-1/libcocos2djs.so 0x94f3e578
D/dalvikvm( 4018): Added shared lib /data/app-lib/com.Ambesek.InfiniteDungeon-1/libcocos2djs.so 0x94f3e578
D/main    ( 4018): cocos_jni_env_init
W/System.err( 4018):    at org.cocos2dx.javascript.SDKWrapper.loadSDKClass(Unknown Source)
W/System.err( 4018):    at org.cocos2dx.javascript.SDKWrapper.setGLSurfaceView(Unknown Source)
W/System.err( 4018):    at org.cocos2dx.javascript.AppActivity.onCreateView(Unknown Source)
W/System.err( 4018):    at org.cocos2dx.lib.Cocos2dxActivity.addSurfaceView(Unknown Source)
W/System.err( 4018):    at org.cocos2dx.lib.Cocos2dxActivity.init(Unknown Source)
W/System.err( 4018):    at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Unknown Source)
W/System.err( 4018):    at org.cocos2dx.javascript.AppActivity.onCreate(Unknown Source)
E/AndroidRuntime( 4018):        at org.cocos2dx.javascript.AppActivity.onCreate(Unknown Source)
W/ActivityManager(  480):   Force finishing activity com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity
W/ActivityManager(  480): Activity pause timeout for ActivityRecord{4a9bfd60 u0 com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity t8 f}

without the | grep cocos I get:

I/ActivityManager(  480): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity bnds=[742,174][946,301] (has extras)} from pid 671
D/yeshen  (  671): launcher onpause
W/ContextImpl(  671): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1137 android.content.ContextWrapper.sendBroadcast:370 com.vphone.launcher.Stats.recordLaunch:129 com.vphone.launcher.Launcher.c:3452 com.vphone.launcher.Launcher.onClickAppShortcut:3404
I/ActivityManager(  480): Start proc com.Ambesek.InfiniteDungeon for activity com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity: pid=4058 uid=10041 gids={50041, 3003}
E/SurfaceFlinger(  165): glCheckFramebufferStatusOES error 36054
E/SurfaceFlinger(  165): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
D/SurfaceFlinger(  165): setOrientation, mFbdev=0xb78c9d80, mFbDev->setOrientation=0xb68f8d70, orientation=3
I/gralloc_nox(  165): setOrientation: orientation=3
I/ActivityManager(  480): Config changes=480 {1.0 724mcc?mnc pt_BR ldltr sw480dp w480dp h828dp 240dpi lrg long port finger qwerty/v/v dpad/v s.10}
D/Sensors (  480): Client connection accepted (191)
I/InputReader(  480): Reconfiguring input devices.  changes=0x00000004
I/InputReader(  480): Device reconfigured: id=1, name='seamless mouse', size 1280x720, orientation 3, mode 1, display id 0
I/InputReader(  480): Device reconfigured: id=3, name='Android Input', size 1280x720, orientation 3, mode 1, display id 0
D/Tinker.DefaultAppLike(  671): onConfigurationChanged:{1.0 724mcc?mnc pt_BR ldltr sw480dp w480dp h828dp 240dpi lrg long port finger qwerty/v/v dpad/v s.10}
D/PhoneStatusBar(  537): mSettingsPanelGravity = 55
W/NetworkManagementSocketTagger(  480): setKernelCountSet(10041, 1) failed with errno -13
I/dalvikvm( 4058): ignoring registerObject request in thread=1
I/dalvikvm( 4058): ignoring registerObject request in thread=1
D/yeshen  (  671): launcher onstop
D/dalvikvm(  537): GC_FOR_ALLOC freed 6461K, 67% free 4305K/13036K, paused 9ms, total 9ms
I/dalvikvm-heap(  537): Grow heap (frag case) to 10.547MB for 6553612-byte allocation
D/dalvikvm(  537): GC_FOR_ALLOC freed 3K, 18% free 10702K/13036K, paused 2ms, total 2ms
D/Cocos2dxActivity( 4058): Cocos2dxActivity onCreate: org.cocos2dx.javascript.AppActivity@4a7a0ed4, savedInstanceState: null
D/dalvikvm(  537): GC_CONCURRENT freed <1K, 18% free 10703K/13036K, paused 0ms+1ms, total 4ms
W/DebugConnManager(  671): getNetworkInfo() on networkType 1
D/dalvikvm( 4058): Trying to load lib /data/app-lib/com.Ambesek.InfiniteDungeon-1/libcocos2djs.so 0x94f3f3c0
D/Tinker.DefaultAppLike(  671): onTrimMemory level:20
D/dalvikvm( 4058): Added shared lib /data/app-lib/com.Ambesek.InfiniteDungeon-1/libcocos2djs.so 0x94f3f3c0
D/JniHelper( 4058): JniHelper::setJavaVM(0xb96acd40), pthread_self() = -1217109824
D/main    ( 4058): cocos_jni_env_init
D/Cocos2dxHelper( 4058): isSupportLowLatency:false
D/Cocos2dxHelper( 4058): sampleRate: 44100, framesPerBuffer: 880
D/JniImp  ( 4058): nativeSetAudioDeviceInfo: sampleRate: 44100, bufferSizeInFrames: 880
W/System.err( 4058): org.json.JSONException: No value for serviceClassPath
W/System.err( 4058):    at org.json.JSONObject.get(JSONObject.java:355)
W/System.err( 4058):    at org.json.JSONObject.getJSONArray(JSONObject.java:549)
W/System.err( 4058):    at org.cocos2dx.javascript.SDKWrapper.loadSDKClass(Unknown Source)
W/System.err( 4058):    at org.cocos2dx.javascript.SDKWrapper.setGLSurfaceView(Unknown Source)
W/System.err( 4058):    at org.cocos2dx.javascript.AppActivity.onCreateView(Unknown Source)
W/System.err( 4058):    at org.cocos2dx.lib.Cocos2dxActivity.addSurfaceView(Unknown Source)
W/System.err( 4058):    at org.cocos2dx.lib.Cocos2dxActivity.init(Unknown Source)
W/System.err( 4058):    at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Unknown Source)
W/System.err( 4058):    at com.sdkbox.plugin.SDKBoxActivity.onCreate(Unknown Source)
W/System.err( 4058):    at org.cocos2dx.javascript.AppActivity.onCreate(Unknown Source)
W/System.err( 4058):    at android.app.Activity.performCreate(Activity.java:5231)
W/System.err( 4058):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
W/System.err( 4058):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2157)
W/System.err( 4058):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2243)
W/System.err( 4058):    at android.app.ActivityThread.access$800(ActivityThread.java:135)
W/System.err( 4058):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
W/System.err( 4058):    at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 4058):    at android.os.Looper.loop(Looper.java:136)
W/System.err( 4058):    at android.app.ActivityThread.main(ActivityThread.java:5019)
W/System.err( 4058):    at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 4058):    at java.lang.reflect.Method.invoke(Method.java:515)
W/System.err( 4058):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
W/System.err( 4058):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
W/System.err( 4058):    at dalvik.system.NativeStart.main(Native Method)
D/Cocos2dxActivity( 4058): model=SM-N9005
D/Cocos2dxActivity( 4058): product=lineage_hlte
D/Cocos2dxActivity( 4058): isEmulator=false
I/SDKBOX_CORE( 4058): Sdkbox Droid starting.
W/dalvikvm( 4058): No implementation found for native Lcom/sdkbox/plugin/SDKBox;.nativeInit:(Ljava/lang/Object;Ljava/lang/ClassLoader;)V
D/AndroidRuntime( 4058): Shutting down VM
W/dalvikvm( 4058): threadid=1: thread exiting with uncaught exception (group=0x94c5bb20)
E/AndroidRuntime( 4058): FATAL EXCEPTION: main
E/AndroidRuntime( 4058): Process: com.Ambesek.InfiniteDungeon, PID: 4058
E/AndroidRuntime( 4058): java.lang.UnsatisfiedLinkError: Native method not found: com.sdkbox.plugin.SDKBox.nativeInit:(Ljava/lang/Object;Ljava/lang/ClassLoader;)V
E/AndroidRuntime( 4058):        at com.sdkbox.plugin.SDKBox.nativeInit(Native Method)
E/AndroidRuntime( 4058):        at com.sdkbox.plugin.SDKBox.init(Unknown Source)
E/AndroidRuntime( 4058):        at com.sdkbox.plugin.SDKBoxActivity.onCreate(Unknown Source)
E/AndroidRuntime( 4058):        at org.cocos2dx.javascript.AppActivity.onCreate(Unknown Source)
E/AndroidRuntime( 4058):        at android.app.Activity.performCreate(Activity.java:5231)
E/AndroidRuntime( 4058):        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
E/AndroidRuntime( 4058):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2157)
E/AndroidRuntime( 4058):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2243)
E/AndroidRuntime( 4058):        at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime( 4058):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime( 4058):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 4058):        at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 4058):        at android.app.ActivityThread.main(ActivityThread.java:5019)
E/AndroidRuntime( 4058):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4058):        at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 4058):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
E/AndroidRuntime( 4058):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
E/AndroidRuntime( 4058):        at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager(  480):   Force finishing activity com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity
D/SurfaceFlinger(  165): setOrientation, mFbdev=0xb78c9d80, mFbDev->setOrientation=0xb68f8d70, orientation=0
I/gralloc_nox(  165): setOrientation: orientation=0
D/Tinker.DefaultAppLike(  671): onConfigurationChanged:{1.0 724mcc?mnc pt_BR ldltr sw480dp w853dp h454dp 240dpi lrg long land finger qwerty/v/v dpad/v s.11}
I/ActivityManager(  480): Config changes=480 {1.0 724mcc?mnc pt_BR ldltr sw480dp w853dp h454dp 240dpi lrg long land finger qwerty/v/v dpad/v s.11}
I/InputReader(  480): Reconfiguring input devices.  changes=0x00000004
I/InputReader(  480): Device reconfigured: id=1, name='seamless mouse', size 1280x720, orientation 0, mode 1, display id 0
I/InputReader(  480): Device reconfigured: id=3, name='Android Input', size 1280x720, orientation 0, mode 1, display id 0
W/WindowManager(  480): updateFocusedWindowLocked, focusedAppToken is null.
I/Finsky  ( 1144): [1] phj.onTrimMemory(1): Memory trim requested to level 80
W/aqaw    (  642): Empty content. Thus might mean that the settings are not synced down.
I/WindowManager(  480): Screen frozen for +312ms due to Window{4a9c6d94 u0 Starting com.Ambesek.InfiniteDungeon}
D/PhoneStatusBar(  537): mSettingsPanelGravity = 55
W/ActivityManager(  480): Activity pause timeout for ActivityRecord{4a9c9f2c u0 com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity t9 f}
W/NetworkManagementSocketTagger(  480): setKernelCountSet(10041, 0) failed with errno -13
D/dalvikvm(  537): GC_FOR_ALLOC freed 6439K, 67% free 4318K/13036K, paused 3ms, total 3ms
I/dalvikvm-heap(  537): Grow heap (frag case) to 10.559MB for 6553612-byte allocation
D/dalvikvm(  537): GC_CONCURRENT freed 2K, 18% free 10715K/13036K, paused 2ms+1ms, total 5ms
D/dalvikvm(  480): GC_EXPLICIT freed 762K, 17% free 9658K/11596K, paused 0ms+1ms, total 10ms
E/WindowManager(  480): Starting window AppWindowToken{4aa4c770 token=Token{4a8d4a60 ActivityRecord{4a9c9f2c u0 com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity t9}}} timed out
W/ActivityManager(  480): Activity destroy timeout for ActivityRecord{4a9c9f2c u0 com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity t9 f}

the apk do not contains sdkbox cpp native code .

can you compile with SDKBOX_ENABLED as bellow:

#define SDKBOX_ENABLED 1

#ifdef SDKBOX_ENABLED
#include "PluginOneSignalJS.hpp"
#include "PluginOneSignalJSHelper.h"
#endif

?

Made the changes, and the result was the same:

I/ActivityManager(  478): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity bnds=[742,174][946,301] (has extras)} from pid 681
D/dalvikvm(  478): GC_FOR_ALLOC freed 292K, 13% free 7948K/9124K, paused 7ms, total 7ms
I/dalvikvm-heap(  478): Grow heap (frag case) to 8.038MB for 214524-byte allocation
D/dalvikvm(  478): GC_FOR_ALLOC freed 1K, 13% free 8156K/9336K, paused 8ms, total 8ms
W/ContextImpl(  681): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1137 android.content.ContextWrapper.sendBroadcast:370 com.vphone.launcher.Stats.recordLaunch:129 com.vphone.launcher.Launcher.c:3452 com.vphone.launcher.Launcher.onClickAppShortcut:3404
D/yeshen  (  681): launcher onpause
W/ContextImpl(  681): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1556 android.content.ContextWrapper.bindService:517 com.google.android.gms.common.stats.zza.zza:-1 com.google.android.gms.common.stats.zza.zza:-1 com.google.android.gms.ads.identifier.AdvertisingIdClient.zzc:-1
I/ActivityManager(  478): Start proc com.Ambesek.InfiniteDungeon for activity com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity: pid=1650 uid=10041 gids={50041, 3003}
E/SurfaceFlinger(  164): glCheckFramebufferStatusOES error 36054
E/SurfaceFlinger(  164): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
I/qtaguid (  681): Untagging socket 78 failed errno=-13
W/NetworkManagementSocketTagger(  681): untagSocket(78) failed with errno -13
I/qtaguid (  681): Untagging socket 92 failed errno=-13
W/NetworkManagementSocketTagger(  681): untagSocket(92) failed with errno -13
I/qtaguid (  681): Untagging socket 103 failed errno=-13
W/NetworkManagementSocketTagger(  681): untagSocket(103) failed with errno -13
I/qtaguid (  681): Untagging socket 104 failed errno=-13
W/NetworkManagementSocketTagger(  681): untagSocket(104) failed with errno -13
I/qtaguid (  681): Tagging socket 78 with tag 49e2824000000000(1239581248) for uid -1 failed errno=-13
I/NetworkManagementSocketTagger(  681): tagSocketFd(78, 1239581248, -1) failed with errno-13
D/SurfaceFlinger(  164): setOrientation, mFbdev=0xb7d63d80, mFbDev->setOrientation=0xb698ad70, orientation=3
I/gralloc_nox(  164): setOrientation: orientation=3
I/InputReader(  478): Reconfiguring input devices.  changes=0x00000004
I/InputReader(  478): Device reconfigured: id=1, name='Android Input', size 1280x720, orientation 3, mode 1, display id 0
I/InputReader(  478): Device reconfigured: id=3, name='seamless mouse', size 1280x720, orientation 3, mode 1, display id 0
I/ActivityManager(  478): Config changes=480 {1.0 724mcc?mnc pt_BR ldltr sw480dp w480dp h828dp 240dpi lrg long port finger qwerty/v/v dpad/v s.6}
D/PhoneStatusBar(  538): mSettingsPanelGravity = 55
W/NetworkManagementSocketTagger(  478): setKernelCountSet(10041, 1) failed with errno -13
I/dalvikvm( 1650): ignoring registerObject request in thread=1
I/dalvikvm( 1650): ignoring registerObject request in thread=1
D/Tinker.DefaultAppLike(  681): onConfigurationChanged:{1.0 724mcc?mnc pt_BR ldltr sw480dp w480dp h828dp 240dpi lrg long port finger qwerty/v/v dpad/v s.6}
D/yeshen  (  681): launcher onstop
D/dalvikvm(  538): GC_FOR_ALLOC freed 6675K, 62% free 4281K/11024K, paused 10ms, total 10ms
I/dalvikvm-heap(  538): Grow heap (frag case) to 10.493MB for 6553612-byte allocation
D/Sensors (  478): Client connection accepted (190)
D/        (  478): HostConnection::get() New Host Connection established 0xb875a3a0, tid 490
D/dalvikvm(  538): GC_FOR_ALLOC freed 9K, 4% free 10672K/11024K, paused 14ms, total 14ms
W/DebugConnManager(  681): getNetworkInfo() on networkType 1
D/dalvikvm(  538): GC_CONCURRENT freed 0K, 4% free 10672K/11024K, paused 1ms+0ms, total 4ms
D/Tinker.DefaultAppLike(  681): onTrimMemory level:20
D/Cocos2dxActivity( 1650): Cocos2dxActivity onCreate: org.cocos2dx.javascript.AppActivity@4a7ee3dc, savedInstanceState: null
D/dalvikvm( 1650): Trying to load lib /data/app-lib/com.Ambesek.InfiniteDungeon-1/libcocos2djs.so 0x94fd9a68
D/houdini ( 1650): [1650] Loading library(version: 4.0.8.45720 RELEASE)... successfully.
I/qtaguid (  681): Tagging socket 98 with tag 49e2824000000000(1239581248) for uid -1 failed errno=-13
I/NetworkManagementSocketTagger(  681): tagSocketFd(98, 1239581248, -1) failed with errno-13
D/dalvikvm( 1650): Added shared lib /data/app-lib/com.Ambesek.InfiniteDungeon-1/libcocos2djs.so 0x94fd9a68
D/JniHelper( 1650): JniHelper::setJavaVM(0x7f66cc24), pthread_self() = -1216413504
D/main    ( 1650): cocos_jni_env_init
D/Cocos2dxHelper( 1650): isSupportLowLatency:false
D/Cocos2dxHelper( 1650): sampleRate: 44100, framesPerBuffer: 880
D/JniImp  ( 1650): nativeSetAudioDeviceInfo: sampleRate: 44100, bufferSizeInFrames: 880
W/System.err( 1650): org.json.JSONException: No value for serviceClassPath
W/System.err( 1650):    at org.json.JSONObject.get(JSONObject.java:355)
W/System.err( 1650):    at org.json.JSONObject.getJSONArray(JSONObject.java:549)
W/System.err( 1650):    at org.cocos2dx.javascript.SDKWrapper.loadSDKClass(Unknown Source)
W/System.err( 1650):    at org.cocos2dx.javascript.SDKWrapper.setGLSurfaceView(Unknown Source)
W/System.err( 1650):    at org.cocos2dx.javascript.AppActivity.onCreateView(Unknown Source)
W/System.err( 1650):    at org.cocos2dx.lib.Cocos2dxActivity.addSurfaceView(Unknown Source)
W/System.err( 1650):    at org.cocos2dx.lib.Cocos2dxActivity.init(Unknown Source)
W/System.err( 1650):    at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Unknown Source)
W/System.err( 1650):    at com.sdkbox.plugin.SDKBoxActivity.onCreate(Unknown Source)
W/System.err( 1650):    at org.cocos2dx.javascript.AppActivity.onCreate(Unknown Source)
W/System.err( 1650):    at android.app.Activity.performCreate(Activity.java:5231)
W/System.err( 1650):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
W/System.err( 1650):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2157)
W/System.err( 1650):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2243)
W/System.err( 1650):    at android.app.ActivityThread.access$800(ActivityThread.java:135)
W/System.err( 1650):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
W/System.err( 1650):    at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 1650):    at android.os.Looper.loop(Looper.java:136)
W/System.err( 1650):    at android.app.ActivityThread.main(ActivityThread.java:5019)
W/System.err( 1650):    at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 1650):    at java.lang.reflect.Method.invoke(Method.java:515)
W/System.err( 1650):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
W/System.err( 1650):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
W/System.err( 1650):    at dalvik.system.NativeStart.main(Native Method)
D/Cocos2dxActivity( 1650): model=SM-N9005
D/Cocos2dxActivity( 1650): product=lineage_hlte
D/Cocos2dxActivity( 1650): isEmulator=false
I/SDKBOX_CORE( 1650): Sdkbox Droid starting.
W/dalvikvm( 1650): No implementation found for native Lcom/sdkbox/plugin/SDKBox;.nativeInit:(Ljava/lang/Object;Ljava/lang/ClassLoader;)V
D/AndroidRuntime( 1650): Shutting down VM
W/dalvikvm( 1650): threadid=1: thread exiting with uncaught exception (group=0x94d05b20)
E/AndroidRuntime( 1650): FATAL EXCEPTION: main
E/AndroidRuntime( 1650): Process: com.Ambesek.InfiniteDungeon, PID: 1650
E/AndroidRuntime( 1650): java.lang.UnsatisfiedLinkError: Native method not found: com.sdkbox.plugin.SDKBox.nativeInit:(Ljava/lang/Object;Ljava/lang/ClassLoader;)V
E/AndroidRuntime( 1650):        at com.sdkbox.plugin.SDKBox.nativeInit(Native Method)
E/AndroidRuntime( 1650):        at com.sdkbox.plugin.SDKBox.init(Unknown Source)
E/AndroidRuntime( 1650):        at com.sdkbox.plugin.SDKBoxActivity.onCreate(Unknown Source)
E/AndroidRuntime( 1650):        at org.cocos2dx.javascript.AppActivity.onCreate(Unknown Source)
E/AndroidRuntime( 1650):        at android.app.Activity.performCreate(Activity.java:5231)
E/AndroidRuntime( 1650):        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
E/AndroidRuntime( 1650):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2157)
E/AndroidRuntime( 1650):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2243)
E/AndroidRuntime( 1650):        at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime( 1650):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime( 1650):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1650):        at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 1650):        at android.app.ActivityThread.main(ActivityThread.java:5019)
E/AndroidRuntime( 1650):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1650):        at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1650):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
E/AndroidRuntime( 1650):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
E/AndroidRuntime( 1650):        at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager(  478):   Force finishing activity com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity
D/SurfaceFlinger(  164): setOrientation, mFbdev=0xb7d63d80, mFbDev->setOrientation=0xb698ad70, orientation=0
I/gralloc_nox(  164): setOrientation: orientation=0
D/dalvikvm(  478): GC_FOR_ALLOC freed 228K, 12% free 8241K/9336K, paused 9ms, total 9ms
I/dalvikvm-heap(  478): Grow heap (frag case) to 8.725MB for 635808-byte allocation
D/dalvikvm(  478): GC_FOR_ALLOC freed 5K, 12% free 8856K/9960K, paused 9ms, total 9ms
W/WindowManager(  478): updateFocusedWindowLocked, focusedAppToken is null.
I/ActivityManager(  478): Config changes=480 {1.0 724mcc?mnc pt_BR ldltr sw480dp w853dp h454dp 240dpi lrg long land finger qwerty/v/v dpad/v s.7}
D/Tinker.DefaultAppLike(  681): onConfigurationChanged:{1.0 724mcc?mnc pt_BR ldltr sw480dp w853dp h454dp 240dpi lrg long land finger qwerty/v/v dpad/v s.7}
D/PhoneStatusBar(  538): mSettingsPanelGravity = 55
I/InputReader(  478): Reconfiguring input devices.  changes=0x00000004
I/InputReader(  478): Device reconfigured: id=1, name='Android Input', size 1280x720, orientation 0, mode 1, display id 0
I/InputReader(  478): Device reconfigured: id=3, name='seamless mouse', size 1280x720, orientation 0, mode 1, display id 0
D/        (  478): HostConnection::get() New Host Connection established 0xb8815950, tid 491
W/aqaw    (  642): Empty content. Thus might mean that the settings are not synced down.
I/WindowManager(  478): Screen frozen for +1s51ms due to Window{4aa51764 u0 Application Error: com.Ambesek.InfiniteDungeon}
W/ActivityManager(  478): Activity pause timeout for ActivityRecord{4a9ba228 u0 com.Ambesek.InfiniteDungeon/org.cocos2dx.javascript.AppActivity t2 f}
I/qwert   (  681): Info3
D/dalvikvm(  538): GC_FOR_ALLOC freed 6456K, 62% free 4288K/11024K, paused 2ms, total 2ms
I/dalvikvm-heap(  538): Grow heap (frag case) to 10.500MB for 6553612-byte allocation
W/NetworkManagementSocketTagger(  478): setKernelCountSet(10041, 0) failed with errno -13
D/dalvikvm(  538): GC_CONCURRENT freed 2K, 4% free 10685K/11024K, paused 1ms+1ms, total 10ms
I/Process ( 1650): Sending signal. PID: 1650 SIG: 9
W/ContextImpl(  478): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1123 com.android.server.am.ActivityManagerService.handleApplicationCrashInner:9670 com.android.server.am.ActivityManagerService.handleApplicationCrash:9644 android.app.ActivityManagerNative.onTransact:1311 com.android.server.am.ActivityManagerService.onTransact:2071
I/ActivityManager(  478): Process com.Ambesek.InfiniteDungeon (pid 1650) has died.
W/InputMethodManagerService(  478): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4aa293bc attribute=null, token = android.os.BinderProxy@4aa19f50
D/dalvikvm( 1008): GC_CONCURRENT freed 3242K, 20% free 13395K/16736K, paused 4ms+2ms, total 13ms
D/dalvikvm(  478): GC_EXPLICIT freed 390K, 13% free 8730K/9960K, paused 0ms+1ms, total 8ms
^C
C:\Users\VinnyManifesto>

I will make a example with ccc 2.1.3.

1 Like

plz check with https://github.com/sdkbox/sdkbox-sample-ccc211/blob/master/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/jni/Android.mk#L21-L38

or

Hello, I still have the same crash, with the same logcat.
I changed my Android.mk from:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := cocos2djs_shared

LOCAL_MODULE_FILENAME := libcocos2djs

ifeq ($(USE_ARM_MODE),1)
LOCAL_ARM_MODE := arm
endif

LOCAL_SRC_FILES := hellojavascript/main.cpp \
../../../Classes/AppDelegate.cpp \
../../../Classes/jsb_module_register.cpp \
../../../Classes/PluginOneSignalJS.cpp \
../../../Classes/PluginOneSignalJSHelper.cpp \
../../../Classes/SDKBoxJSHelper.cpp
LOCAL_CPPFLAGS := -DSDKBOX_ENABLED \
-DSDKBOX_COCOS_CREATOR
LOCAL_LDLIBS := -landroid \
-llog
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../Classes
LOCAL_WHOLE_STATIC_LIBRARIES += PluginOneSignal
LOCAL_WHOLE_STATIC_LIBRARIES += sdkbox

LOCAL_STATIC_LIBRARIES := cocos2dx_static

include $(BUILD_SHARED_LIBRARY)
$(call import-add-path,$(LOCAL_PATH))

$(call import-module, cocos)
$(call import-module, ./sdkbox)
$(call import-module, ./PluginOneSignal)

to:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := cocos2djs_shared

LOCAL_MODULE_FILENAME := libcocos2djs

ifeq ($(USE_ARM_MODE),1)
LOCAL_ARM_MODE := arm
endif

LOCAL_SRC_FILES := hellojavascript/main.cpp \
../../../Classes/AppDelegate.cpp \
../../../Classes/jsb_module_register.cpp \
../../../Classes/PluginOneSignalJS.cpp \
../../../Classes/PluginOneSignalJSHelper.cpp \
../../../Classes/SDKBoxJSHelper.cpp
LOCAL_CPPFLAGS := -DSDKBOX_ENABLED \
-DSDKBOX_COCOS_CREATOR
LOCAL_LDLIBS := -landroid \
-llog
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../Classes

ifeq ($(USE_ANY_SDK),1)
LOCAL_SRC_FILES += ../../../Classes/anysdk/SDKManager.cpp ../../../Classes/anysdk/jsb_anysdk_basic_conversions.cpp ../../../Classes/anysdk/manualanysdkbindings.cpp ../../../Classes/anysdk/jsb_anysdk_protocols_auto.cpp

LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../../Classes/anysdk

LOCAL_WHOLE_STATIC_LIBRARIES := PluginProtocolStatic
endif

LOCAL_WHOLE_STATIC_LIBRARIES += PluginOneSignal
LOCAL_WHOLE_STATIC_LIBRARIES += sdkbox

LOCAL_STATIC_LIBRARIES := cocos2dx_static

LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2

include $(BUILD_SHARED_LIBRARY)
$(call import-add-path,$(LOCAL_PATH))

$(call import-module, cocos)
$(call import-module, ./sdkbox)
$(call import-module, ./PluginOneSignal)

My build can be seen at https://www.dropbox.com/s/h7hdqfix7mjylvb/jsb-default.7z?dl=1
Project at: https://github.com/VinnyAmbesek/infiniteDungeon

Or do you mean the whole project?

2019-11-07 22:24:20.135 25227-25227/com.Ambesek.InfiniteDungeon I/SDKBOX_CORE: Sdkbox Droid starting.
2019-11-07 22:24:20.136 25227-25227/com.Ambesek.InfiniteDungeon I/SDKBOX_CORE: Sdkbox got VM.
2019-11-07 22:24:20.136 25227-25227/com.Ambesek.InfiniteDungeon I/SDKBOX_CORE: Sdkbox jni initialized.
2019-11-07 22:24:20.137 25227-25227/com.Ambesek.InfiniteDungeon D/SDKBOX_CORE: Can't load tracking info: java.io.IOException: Stream closed

everything is fine.

maybe you can try PROP_APP_ABI=armeabi-v7a.

1 Like

That worked. I addded it to my prop_app_abi: ‘PROP_APP_ABI=arm64-v8a:armeabi-v7a’ and it worked.

Thanks for the help and patience.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.