Saranshmalik / react-native-zendesk

React native wrapper for Zendesk SDK
MIT License
29 stars 42 forks source link

Attempt to invoke virtual method 'zendesk.core.CoreModule zendesk.core.ZendeskShadow.coreModdule()' on a null object reference #3

Closed victor-scaleforce closed 3 years ago

victor-scaleforce commented 4 years ago

This error "Attempt to invoke virtual method 'zendesk.core.CoreModule zendesk.core.ZendeskShadow.coreModdule()' on a null object reference" pops when calling .

ZendeskChat.startChat({ name: 'test', email: 'test', phone: 'test', tags: ['tag1', 'tag2'], department: 'Your department', chatOnly: false, botName: 'bottest', });

Saranshmalik commented 4 years ago

Did you init with proper keys before using the startChat method? I tried and couldn't replicate it out. Also please let me know some more details, like it was dev or prod environment. What device did you try etc

tinni95 commented 4 years ago

same here, react-native 0.63 and I called RNZendeskChat.initChat(CHAT_ID); before

Saranshmalik commented 3 years ago

Could you like get me a demo app or something? I am unable to replicate this out.

stewartmcgown commented 3 years ago

initChat is broken in latest release, make sure you use init instead. Use the keys from the Mobile SDK section in Zendesk

Saranshmalik commented 3 years ago

I'll look over the initChat method

Saranshmalik commented 3 years ago

I see no issue initChat worked just fine, can you guys let me know what exactly is the issue you facing?

stewartmcgown commented 3 years ago

Did you also run .init in the same project? The issue is with projects that do not call init.

On Fri, 20 Nov 2020, 09:23 Saransh Malik, notifications@github.com wrote:

I see no issue initChat worked just fine, can you guys let me know what exactly is the issue you facing?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Saranshmalik/react-native-zendesk/issues/3#issuecomment-731050932, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIVNFDICAAOS6TV4XUXN53SQYYPXANCNFSM4SQNBE4A .

Saranshmalik commented 3 years ago

Nope I replaced my init call with initChat and then used startChat, it connected with my zendesk chat and I could send and receive messages

Saranshmalik commented 3 years ago

Did you guys use chatOnly:true while using startChat function?

stewartmcgown commented 3 years ago

I did yeah 😕

On Fri, 20 Nov 2020, 10:08 Saransh Malik, notifications@github.com wrote:

Did you guys use chatOnly:true while using startChat function?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Saranshmalik/react-native-zendesk/issues/3#issuecomment-731075086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIVNFBOU6UXBLFUE2NC3GDSQY52BANCNFSM4SQNBE4A .

Saranshmalik commented 3 years ago

Which RN version did you try on? Maybe some issues with RN versions.

stewartmcgown commented 3 years ago

0.63.3

On Mon, Nov 30, 2020 at 10:52 AM Saransh Malik notifications@github.com wrote:

Which RN version did you try on? Maybe some issues with RN versions.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Saranshmalik/react-native-zendesk/issues/3#issuecomment-735710713, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIVNFCFQMFJVXFHIKS25A3SSN2OBANCNFSM4SQNBE4A .

Saranshmalik commented 3 years ago

I tried on the same too. And use the lib in a production app and never heard back of such crash. Will try investigate more, you recieve the exact error as the one mentioned?