[SOLVED] Facebook Login/Logout game crash

Hello! I am using Cocos Creator 1.7.2 (1.7.0 same error) and Facebook plugin 2.3.17.5

When on Android device I am pressed login, after successful authentication, game crashed with next errors:

01-09 13:11:05.068  7415  7415 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0xe24 in tid 7415 (clap.spellblast)
01-09 13:11:05.068   628   628 W         : debuggerd: handling request: pid=7415 uid=10335 gid=10335 tid=7415
01-09 13:11:05.151  8047  8047 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-09 13:11:05.151  8047  8047 F DEBUG   : Build fingerprint: 'OnePlus/OnePlus5/OnePlus5:7.1.1/NMF26X/11141953:user/release-keys'
01-09 13:11:05.151  8047  8047 F DEBUG   : Revision: '0'
01-09 13:11:05.151  8047  8047 F DEBUG   : ABI: 'arm'
01-09 13:11:05.152  8047  8047 F DEBUG   : pid: 7415, tid: 7415, name: clap.spellblast  >>> com.tapclap.spellblast <<<
01-09 13:11:05.152  8047  8047 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xe24
01-09 13:11:05.152  8047  8047 F DEBUG   :     r0 00000000  r1 00000000  r2 00000000  r3 d03b9f78
01-09 13:11:05.152  8047  8047 F DEBUG   :     r4 00000000  r5 fff53f80  r6 fff53ff0  r7 fff54138
01-09 13:11:05.152  8047  8047 F DEBUG   :     r8 f40d3008  r9 fff53f80  sl 00000000  fp fff540bc
01-09 13:11:05.152  8047  8047 F DEBUG   :     ip d039cafc  sp fff53f50  lr cf800931  pc cf800934  cpsr 400e0030
01-09 13:11:05.154  8047  8047 F DEBUG   :
01-09 13:11:05.154  8047  8047 F DEBUG   : backtrace:
01-09 13:11:05.154  8047  8047 F DEBUG   :     #00 pc 004f8934  /data/app/com.tapclap.spellblast-2/lib/arm/libcocos2djs.so
01-09 13:11:05.155  8047  8047 F DEBUG   :     #01 pc 004f8985  /data/app/com.tapclap.spellblast-2/lib/arm/libcocos2djs.so
01-09 13:11:05.155  8047  8047 F DEBUG   :     #02 pc 0022b58c  /data/app/com.tapclap.spellblast-2/lib/arm/libcocos2djs.so (_ZN18FacebookListenerJS13onGetUserInfoERKN6sdkbox11FBGraphUserE+56)
01-09 13:11:05.155  8047  8047 F DEBUG   :     #03 pc 00232a6f  /data/app/com.tapclap.spellblast-2/lib/arm/libcocos2djs.so (Java_com_sdkbox_plugin_PluginFacebook_onUserInfo+50)
01-09 13:11:05.155  8047  8047 F DEBUG   :     #04 pc 0090bc49  /data/app/com.tapclap.spellblast-2/oat/arm/base.odex (offset 0x8cd000)

If reopen the game after crush, user successful loginned in Facebook and you can play. If press logout, the same error.
No onUserInfo method in facebook? Someone get same error?
java 1.8.0, API android 25, build armeabi-v7a, no android studio

edit: If I am trying to share something, when Im logged in, got:

01-09 13:42:04.519 13826 13851 E jswrapper: [ERROR] (jni/../../Classes/PluginFacebookJSHelper.cpp, 225): js_PluginFacebookJS_PluginFacebook_share : wrong number of arguments
01-09 13:42:04.519 13826 13851 E jswrapper: [ERROR] Failed to invoke js_PluginFacebookJS_PluginFacebook_share, location: jni/../../Classes/PluginFacebookJSHelper.cpp:228

but all as in documentation

I’ll check it today.

1 Like

Fixed. Need to check other functions too.

        var info = new Object();
        info.type  = "link";
        info.link  = "http://www.cocos2d-x.org";
        info.title = "cocos2d-x";
        info.text  = "Best Game Engine";
        info.image = "http://cocos2d-x.org/images/logo.png";
        sdkbox.PluginFacebook.share(info);

ok for me , plz double check your code again, thanks.

1 Like

Thanks! I will check soon and post my results here

Me too , please help me

this is does not solve problem.
sdkbox download error verison (2.3.17.5)
jsb2 bingings falls compile with error

jni/../../Classes/PluginFacebookJS.cpp: In function 'bool js_PluginFacebookJS_PluginFacebook_setLoginBehavior(se::State&)':
jni/../../Classes/PluginFacebookJS.cpp:66:9: error: 'setLoginBehavior' is not a member of 'sdkbox::PluginFacebook'
         sdkbox::PluginFacebook::setLoginBehavior(arg0);

OK, lets update the version, so u can download it.

did you solve the problem. I got same error. I updated lastest version of cocos creator, but game keep crashing.

sdkbox update --staging

#or

sdkbox import facebook --staging

the version is 2.3.17.7

1 Like

The yinjimmy last post solve my problem for now. Thanks!

i got this error:

_______ ______  _     _ ______   _____  _     _
  |______ |     \ |____/  |_____] |     |  \___/
  ______| |_____/ |    \_ |_____] |_____| _/   \_
 Copyright (c) 2016-2017 SDKBOX Inc. v1.0.1.31
  _                          _
 |o|  o ,      o_,'   o_,   |o|
 |O| <%'.   _`'_ ===  <\_   |O|
 (0) /  |  (_)`-' |    / |  (0)
 p----------------------------g
 #FATAL: unsupported cocos2d-x major version
 Installation failed :(

I downloaded lastest version in cocos2d-x.org.
Please help, my game release next week :frowning:

what is the creator version ?

Cocos Creator v1.7.2 sir!

http://cocos2d-x.org/filedown/CocosCreator_v1.8.1_mac has been released.
And I’ll check this#FATAL: unsupported cocos2d-x major version with creator 1.7.2.

could not reproduce your issue. @kidima

~/test172/build/jsb-default $ sdkbox import facebook --staging --nohelp
  _______ ______  _     _ ______   _____  _     _
  |______ |     \ |____/  |_____] |     |  \___/
  ______| |_____/ |    \_ |_____] |_____| _/   \_
 Copyright (c) 2016-2017 SDKBOX Inc. v1.0.1.31
  _                          _
 |o|  o ,      o_,'   o_,   |o|
 |O| <%'.   _`'_ ===  <\_   |O|
 (0) /  |  (_)`-' |    / |  (0)
 p----------------------------g
 Please reference the online documentation to finish the integration:
http://sdkbox-doc.github.io/en/plugins/facebook/v3-js/
 Installation Successful :)

i tried Cocos creator 1.8.1 but it not working.

C:\Windows\system32>sdkbox import facebook --staging --nohelp


|______ | \ |/ |] | | _/
| |/ | _ |
] |____| / _
Copyright © 2016-2017 SDKBOX Inc. v1.0.1.30
_ _
|o| o , o
,’ o
, |o|
|O| <%’. '_ === <\_ |O| (0) / | (_)-’ | / | (0)
p----------------------------g
A newer version of SDKBOX is available, would you like to update v1.0.1.30 to v1.0.1.31?
Type [Y]es, [n]o or [q]uit
Y
[###################################] 100%
updated SDKBOX v1.0.1.30 to v1.0.1.31 at C:/Users/min/.sdkbox/bin/sdkbox_installer.zip
Restarting SDKBOX.
C:\Windows\system32> _______ ______ _ _ ______ _____ _ _
|
__ | \ |___/ |] | | _/
| |/ | _ |
] |____| / _
Copyright © 2016-2017 SDKBOX Inc. v1.0.1.31
_ _
|o| o , o
,’ o
, |o|
|O| <%’. _'_ === <\_ |O| (0) / | (_)-’ | / | (0)
p----------------------------g
#FATAL: unsupported cocos2d-x major version
Installation failed :frowning:

What i do:

  • delete .skdbox folder
  • delete cocos creator
  • remove project build folder
  • reinstall cocos creator

sdkbox-facebook version is v2.3.17.5

plz cd to your project build folder, such as /project/build/jsb-default $ .

omg, It worked. thanks you alot, yinjimmy!!!
how stupid I am!!!

Go and complete your game.

winer winer, chicken diner