Fb invite crash on ios

I have try to connect it…
all goes well
I choose user to share… and than it tells the inivation is send, I’m moved to fb page and than crash on last line of
class FacebookListenerJsHelper : public sdkbox::FacebookListener
{

private:
void invokeDelegate(std::string& fName, jsval dataVal[], int argc) {
if (!s_cx) {
return;
}
JSContext* cx = s_cx;
const char* func_name = fName.c_str();

    JS::RootedObject obj(cx, mJsDelegate);
    JSAutoCompartment ac(cx, obj); <=== HERE 

EXC_BAD_ACCESS error

seriously? your plugin is crashing and you don’t even replay? it’s iOS 9

Can you tell me which cocos2d-js version are you using?

I’m using v3.8.1. iOS 9.2 (9.1 few days earlier)

any ideas?

I’m going to run some test and let you know.

great I’m waiting :slight_smile:

any results?:slight_smile:

and? :slight_smile: any goos fixes?

How long I have to wait? Sharing also doesn’t not work for me. I think no one is testing JS implementation…

I have tested the public FB + JS example (https://github.com/sdkbox/sdkbox-facebook-sample), cocos2d-x 3.8.1 and the example as is, works for me as expected.

The app does not crash when trying any of the test options either logged-in or not in FB. When not logged-in, i get trace messages about failed operations, but no crashes.

The bundled functionality in the example is share a link.

could you please post your function call, so i can execute exactly the same code ?
devil is in the details, and the lack of any of the fields could raise the error.

On my side, this is the code:

          var info = {};
          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);

Also, if possible, could you post your complete stacktrace ? It will be really helpful for us.

Sorry for the delay.
Thanks.

Hi Ibon,

Thanks for replay.
Share was working last time… but invite didn’t… Could you please try invite? Also are you running ios 9?

Hey Likon,

i tried all the sample’s functionality, including invite (default FB’s invite dialog) flawlessly.
Could you tell me what sdkbox version are you using ?

Yes, i try on ios 9.1.
will upgrade to 9.2 and post if i get any difference.

Thanks.

p.s. Sorry if i request for something that has already been asked for.

Hmm thats weird :confused: thanks for the info I will be searching the problem

It started working. But I have error when I try to share when calling share from not main scene layer but some other layer. Could you please check that?

Did it crash or just out put error message? If you can provide the error messages you’re getting that would help us identify the issue.

Sharing hmm, I think it was my code… I did a loop checking if user is logged and if he isn’t it invoked login again… so I got this 2 pages with login data… it than somehow was not working because I miss the screen with publish permissions etc. But I make it work today, and it works fine!