AppsFlyerSDK / AdobeAirExtension-AppsFlyer

Adobe Air Extension for AppsFlyer
24 stars 22 forks source link

App crashes immediately on launch when built with Appsflyer #27

Closed shaymolho closed 4 years ago

shaymolho commented 4 years ago

Hi,

We're using AppsFlyer ANE for a lot of time already, everything works with no problem. Now we're moving to 64 bit as per Google requirement.

When the app is built on AIR33 64bit architecture - when launching the app, the app crashes immediately, when removing Appsflyer ANE and rebuilding with 64 bit - the app works with no problem.

When building the app on AIR33 32bit with Appsflyer - everything works OK.

So the problem is specifically when building the app with Appsflyer on 64bit

We're using this version of the ANE: AppsFlyerAIRExtension-witout-gp-support.ane version 0.0.3

I'm attaching Android's logcat of app launch. App id is: air.com.wizits.buddies

appsflyer-64bit-crash.txt

We need your help with that asap.

Thanks, Shay

sokoloff06 commented 4 years ago

Hi @shaymolho!

We were not able to reproduce the issue using the latest version of the ANE. Please note, that unfortunately version number you referred to (0.0.3) wasn't properly maintained, this going to be changed in the next release.

Therefore, in order for us to help, can you please:

  1. Confirm that you have used ANE from the release 5.4.1
  2. Send us the crashing apk. The log attached is very long and not clear in terms of where the crash happens. With the apk we will be able to try and locate the logs generated at the moment of the crash itself.
  3. What exact version of AIR SDK do you use? For example: 33.1.1.190

Thank you!

shaymolho commented 4 years ago

Hi Vitaly,

My bad i rechecked again and saw that also AIR33 32bit version with Appsflyer doesn't work (32bit version does work with older version of appslfyer ANE).

So the problem is with the new ANE Version on both 32bit and 64bit.

I'm sending the 2 versions that crash. the 32 bit and the 63 bit:

32 bit: https://www.dropbox.com/s/mbnrrs3u7tsec51/buddies_32bit_NOT_WORKING.apk?dl=1

64 bit: https://www.dropbox.com/s/ij77bcxhbucqkz4/buddies_64bit_NOT_WORKING.apk?dl=1

Thanks, Shay

shaymolho commented 4 years ago

Hi Vitaly,

any updates on the issue?

This is a blocker for us, because we can't submit 64bit version to Android

sokoloff06 commented 4 years ago

Hi @shaymolho!

Can you please enable AppsFlyer SDK debug logs and send the apk again? I guess you can send only 1 version 32 or 64, as issue doesn't seem to be related to the architecture

Also, please take a look at these Android-specific instructions. I can see that they haven't been followed yet and SDK will not function properly. This is unlikely to cause the crash, but this has to be done anyways to make things work.

Thank you, looking forward to your reply!

shaymolho commented 4 years ago

Hi Vitaly,

This is a new version, 32bit with Appflyer on debug mode:

https://www.dropbox.com/s/zr2mcg52h3gwnqv/buddies_32bit_appsflyer_debug.apk?dl=1

Regarding Android instructions, you right. I did them separately and still the ANE crashes. i'll add them to the build as soon as we fix the problem.

Shay

shaymolho commented 4 years ago

Hi VItaly,

any updates on this issue?

We need help asap, cause we cannot submit new versions to the store currently.

shaymolho commented 4 years ago

Hi Vitaly,

Sorry for writing so much, but we really are in an urgent situation

We cannot submit new builds to Android until the issue is fixed

We need your help ASAP Shay

sokoloff06 commented 4 years ago

Hi @shaymolho!

Can you please try the attached version of the library and again share with us the apk?

Thank you!

AppsFlyerAIRExtension-witout-gp-support.ane.zip

shaymolho commented 4 years ago

checking right now!

On Mon, Aug 17, 2020 at 1:34 PM Vitaly Sokolov notifications@github.com wrote:

Hi @shaymolho https://github.com/shaymolho!

Can you please try the attached version of the library and again share with us the apk?

Thank you!

AppsFlyerAIRExtension-witout-gp-support.ane.zip https://github.com/AppsFlyerSDK/AdobeAirExtension-AppsFlyer/files/5083696/AppsFlyerAIRExtension-witout-gp-support.ane.zip

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AppsFlyerSDK/AdobeAirExtension-AppsFlyer/issues/27#issuecomment-674802890, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABT4XYUJF2C4CHHQTN3II33SBEBVHANCNFSM4PZX5XDA .

shaymolho commented 4 years ago

Hi Viatly,

Still not working :(

New apk: https://www.dropbox.com/s/ceb7pxvq2u2vedx/buddies_32bit_appsflyer_new_crash.apk?dl=1

sokoloff06 commented 4 years ago

Hi Shay!

Thanks for sending the apk. I have added some logs in the ANE initialization, but I still don't see any of them, so I guess the code wasn't reached.

We keep investigating. In the meantime, can you please try to build the app locally and put some breakpoints in the ActionScript side? I wonder if there is some freeze/cycle/unhandled exception that causes the issue.

shaymolho commented 4 years ago

Hi Vitaly,

Trying to do so right now. Never debugged directly on the Android, so it's going to be a bit challenging, but i'm on it. I'll update you on any progress i have.

Please update me too when you have something - i'm so nervous that i'm checking this thread every 10 mins...

Thank you for your effort

shaymolho commented 4 years ago

Hi Vitaly,

I tried to debug the app on the device an actually succeed BUT only when running with old appsflyer ANE When running with latest appsflyer ANE the app crashes without getting to the first line of the as3 code.

i'm not sure that the problem is with the skipped frames cause i saw them also when the app succeed to launch.

Tomorrow i'll try to remove all other ANEs and then put them back one by one to see if i can catch the colliding ANE.

Waiting for updates from you.

Thanks, Shay

shaymolho commented 4 years ago

Hi Viatly,

Good morning.

Do you have new updates on this issue?

sokoloff06 commented 4 years ago

Hi @shaymolho! Thank you for the update! We are trying to pinpoint the issue.

From our understanding, the version that works for you is 4.8.18. To double-check it, please try building 32bit version of the app using the attached file appsflyer_4.8.18.ane.zip

Also, can you please try version appsflyer_4.10.0.ane.zip to see if it works.

Once we have clear results this will help to focus on specific changes that we made between those 2.

Thank you, looking forward to your reply!

shaymolho commented 4 years ago

Hi Vitaly,

Doing it right now!

sokoloff06 commented 4 years ago

@shaymolho another 2 things that can help:

  1. Can you confirm that your app descriptor using namespace 33.1?
  2. Would it be possible for you to try either the latest version of the Adobe AIR SDK (33.1.1.217) or at least the next after the one you are currently using? It will be 33.1.1.98

As you can see in the screenshot below HARMAN doesn't let to download 33.1.1.86 anymore and therefore we are not able to reproduce the exact same environment as you have. Although we couldn't yet find any clear issue affecting v86, we assume that upgrading the SDK can help.

image

Lastly, if you can attach your local copy of AIR SDK here we can try to use it to reproduce the issue

Thanks again for your cooperation. Please feel free to let us know if any help is needed

shaymolho commented 4 years ago

Hi Vitaly,

Thank you for your help. Doing all the changes you requested right now and coming back to you with that asap.

shaymolho commented 4 years ago

Hi Vitaly,

Yes, the working version we have is 4.8.18 -- we replaced it with the version you sent me and the game is working with no problem. Version 4.10.0 is ALSO WORKING.

We use app descriptor 33.1 as you asked.

I replaced the AIR version with the newest one (33.1.1.217) and still the App crash on launch with no change, so i don't think sending you our AIR SDK will help.

Thank you Waiting for your reply!

sokoloff06 commented 4 years ago

@shaymolho Thanks for sharing, this is very helpful!

We are checking this and will get back shortly, probably with another build to try.

sokoloff06 commented 4 years ago

@shaymolho can you please try appsflyer_5.4.1_33.1.1.217.zip and let us know?

Thank you!

shaymolho commented 4 years ago

Hi Vitaly,

It's still crashing :(

Attaching the apk: https://www.dropbox.com/s/my7ss3offdcwoz7/vegas-appsflyer_5.4.1_33.1.1.217-CRASHING.apk?dl=1

and this is the logcat: vegas-appsflyer_5.4.1_33.1.1.217-CRASHING.log

app name is: air.com.wizits.vegas

shaymolho commented 4 years ago

While you working on it,

i'm trying to isolate the problem: removing all other ANEs and then returning them one by one to find the colliding one. Maybe it would help

shaymolho commented 4 years ago

Hi Vitaly,

I think we found the problem!

It seems that the problem was with the -swf-version we compiled against. We compiled with version -swf-version=38 and your ANE comiled with -swf-version=43 But Stupid Adobe AIR didn't tell me so compilation went through and crashed only when launched.

After i removed all other ANEs and kept only yours, compilation failed on this problem exactly. so i updated our compiler to work -swf-version=43 and vuallla everything started working....

I still don't get conversion data yet, but i guess it's because i didn't manipulate the final APK as written in your instructions. Doing it now and checking

I'll update here soon!

sokoloff06 commented 4 years ago

@shaymolho this is a great find! Thank you for sharing!

Looking forward to an update from you

shaymolho commented 4 years ago

Hey Vitaly!

Problem is solved!

I built the app in 64 bit, did the manipulation of the APK, and launched the app.

The app is working without problem, and we get the conversion data. So everything is working!

Thank you VERY MUCH for your help. You've been super helpful and super responsive, So thank you for that.

We can start breathing again :)

Shay

shaymolho commented 4 years ago

Question:

I tried to upload the APK to the store after manipluating it and got the following error:

You uploaded an APK that is not zip aligned. You will need to run a zip align tool on your APK and upload it again.

Do you how to solve it? i did all the steps written in your guide

Shay

sokoloff06 commented 4 years ago

Hi @shaymolho! So glad to hear we are progressing!

Regarding zipalign, that's our bad. Seems to have caused by using the apktool.

Can you try the following steps:

  1. Zipalign apk by running zipalign -f -v 4 /{your_dir}/infile.apk /{your_dir}/outfile.apk
  2. Verify apk by running zipalign -c -v 4 outfile.apk

If you don't have zipalign in your PATH, it should be located under .../Android/sdk/build-tools/{build_tool_version}/

shaymolho commented 4 years ago

Hi Vitaly,

It's working! The app in 64bit is working, Appsflyer is sending conversion data, and i was able to submit the App to the Google play store.

So i think we're done here :-)

I want to thank you again for your close support in this issue.

It's was really helpful and encouraging to see we have such support from you, and give us confidence for future work with you.

So thanks again, Shay

sokoloff06 commented 4 years ago

Hi @shaymolho!

Thank you for the update, happy to hear we were able to sort this out :)

We will make sure to update our script to automate zipalign in the future release.

Closing this, Cheers!