Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Tenjin plugin crashing at start of the app
Started by david.ciaudo May 11 2018 12:16 PM

10 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

david.ciaudo

[GLOBAL: userInfoPane.html]
david.ciaudo
  • Enthusiast

  • 51 posts
  • Corona SDK

Hi, I'm trying to use tenjin plugin but my app crashes at the start on Android. Here is the error I can read in my console:

 

05-11 22:07:07.861  8868  8868 E AndroidRuntime: FATAL EXCEPTION: main
05-11 22:07:07.861  8868  8868 E AndroidRuntime: Process: com.gmail.ciaudo.david.dragonmarathon, PID: 8868
05-11 22:07:07.861  8868  8868 E AndroidRuntime: java.lang.NoClassDefFoundError: com.tenjin.android.TenjinSDK$3
05-11 22:07:07.861  8868  8868 E AndroidRuntime:        at com.tenjin.android.TenjinSDK.<init>(TenjinSDK.java:1313)
05-11 22:07:07.861  8868  8868 E AndroidRuntime:        at com.tenjin.android.TenjinSDK.getInstance(TenjinSDK.java:123)
05-11 22:07:07.861  8868  8868 E AndroidRuntime:        at plugin.tenjin.LuaLoader$Init$1.run(LuaLoader.java:417)
05-11 22:07:07.861  8868  8868 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:739)
05-11 22:07:07.861  8868  8868 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:95)
05-11 22:07:07.861  8868  8868 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:158)
05-11 22:07:07.861  8868  8868 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7224)
05-11 22:07:07.861  8868  8868 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
05-11 22:07:07.861  8868  8868 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
05-11 22:07:07.861  8868  8868 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
 
My app is very basic sample with the require plugin and init function.


[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,922 posts
  • Enterprise

I'll ping our Engineering team.

 

Rob



[TOPIC: post.html]
#3

david.ciaudo

[GLOBAL: userInfoPane.html]
david.ciaudo
  • Enthusiast

  • 51 posts
  • Corona SDK

Also I noticed, if I just require the plugin, and not call the init function, the app crashes when I suspend and resume it on my samsung galaxy S7. Here is the crash report:

 

05-12 01:23:30.745  4821  4821 E AndroidRuntime: FATAL EXCEPTION: main
05-12 01:23:30.745  4821  4821 E AndroidRuntime: Process: com.gmail.honeyponeygames.squarekittenjump, PID: 4821
05-12 01:23:30.745  4821  4821 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.tenjin.android.TenjinSDK.connect()' on a null object reference
05-12 01:23:30.745  4821  4821 E AndroidRuntime:        at plugin.tenjin.LuaLoader$1.run(LuaLoader.java:186)
05-12 01:23:30.745  4821  4821 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:739)
05-12 01:23:30.745  4821  4821 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:95)
05-12 01:23:30.745  4821  4821 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:158)
05-12 01:23:30.745  4821  4821 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7224)
05-12 01:23:30.745  4821  4821 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
05-12 01:23:30.745  4821  4821 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
05-12 01:23:30.745  4821  4821 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
 
I hope this gonna be fixed, I really need this plugin.


[TOPIC: post.html]
#4

karpovpw

[GLOBAL: userInfoPane.html]
karpovpw
  • Contributor

  • 258 posts
  • Corona Staff

Fix for that issue should be included in the next plugin update, which is in the work and will be released asap. Stay tuned!



[TOPIC: post.html]
#5

karpovpw

[GLOBAL: userInfoPane.html]
karpovpw
  • Contributor

  • 258 posts
  • Corona Staff

Hi david.ciaudo,

Can you check it on your machine? There was an update with init code refactoring on Tenjin SDK side, so your issue should be fixed. If not, then you'll need to prepare a sample to reproduce an issue and send it to us @ https://portal.coronalabs.com/bug-submission. We'll check it and tell you what should be fixed.



[TOPIC: post.html]
#6

david.ciaudo

[GLOBAL: userInfoPane.html]
david.ciaudo
  • Enthusiast

  • 51 posts
  • Corona SDK

I'll check it out as soon as I'm back from my vacations. By the way, the sample which was crashing is a simple blank project with require tengin and a build setting with the plugin included.

[TOPIC: post.html]
#7

karpovpw

[GLOBAL: userInfoPane.html]
karpovpw
  • Contributor

  • 258 posts
  • Corona Staff

We can't reproduce an issue on our samples. That's why I ask you to send yours, there may be some build settings issue or something.



[TOPIC: post.html]
#8

david.ciaudo

[GLOBAL: userInfoPane.html]
david.ciaudo
  • Enthusiast

  • 51 posts
  • Corona SDK

Hello, I've tried with the latest daily build and the problem is still there:

-crash on init function

-crash on resume (if init is commented and there is the require line)

 

I've submitted an apk to the debug portal but, as I said, it's a simple blank project, with this piece of code:

local tenjin = require "plugin.tenjin"

local TENJIN_KEY = "TVJCWXABBTLUSV45END9WT********"

local tenjinListener = function(e)
	print("tenjin listener")
	for u,v in pairs(e) do
		print(u,v)
	end
end

tenjin.init(tenjinListener, {apiKey = TENJIN_KEY})

and the plugin included in the build.settings:

plugins =
{
["plugin.tenjin"] =
        {
            publisherId = "com.coronalabs"
        },
},

I did not submitted a crash log file, I don't know where I can find this when testing on device.



[TOPIC: post.html]
#9

karpovpw

[GLOBAL: userInfoPane.html]
karpovpw
  • Contributor

  • 258 posts
  • Corona Staff

Thanks for the feedback!

Seems that this new sdk update haven't solved the issue. We'll investigate it more with Tenjin team asap  B)



[TOPIC: post.html]
#10

karpovpw

[GLOBAL: userInfoPane.html]
karpovpw
  • Contributor

  • 258 posts
  • Corona Staff

To everyone lurking:

Thanks to David, his help and patience, both issues was solved and fix is already public.



[TOPIC: post.html]
#11

david.ciaudo

[GLOBAL: userInfoPane.html]
david.ciaudo
  • Enthusiast

  • 51 posts
  • Corona SDK

Thx it's working! No more crash.

 

Also, I just had to put hasUserConsent = true in the init because when it's false, I don't receive any event.




[topic_controls]
[/topic_controls]