[OneSignal Plugin] Android Build Error

Forge Component
(13)
Published on 7 May by OutSystems R&D
13 votes
Published on 7 May by OutSystems R&D

OneSignal Plugin Error when generating Android mobile app. Says "

The following errors have occurred:• In Android on 2019-05-17 at 08:43:25 - An unexpected error has occurred while packaging your application. Please try again. If the problem persists, contact OutSystems Support."



Progress bar gets to the end, then pauses, then throws that error.

-Installed OneSignal from forge

-Works on iOS build

-Android build fails


[2019-05-17T12:42:40.101Z] [INFO] Applying plugins in the config.xml file...

[2019-05-17T12:42:40.101Z] [INFO] Plugin Id: https://github.com/OutSystems/OneSignal-Cordova-SDK.git#2.4.5-OS

[2019-05-17T12:42:40.102Z] [INFO] Plugin Action: add

[2019-05-17T12:42:43.700Z] [INFO] Getting signing keys...

[2019-05-17T12:42:43.749Z] [INFO] Building application package...

[2019-05-17T12:42:50.793Z] [INFO] Checking application package...

[2019-05-17T12:42:50.793Z] [ERROR] Unable to locate the application package!

[2019-05-17T12:42:50.793Z] [ERROR] Unable to locate the application package!

[2019-05-17T12:42:50.794Z] [ERROR] Build failed with the following error: An unexpected error has occurred while packaging your application. Please try again. If the problem persists, contact OutSystems Support.

[2019-05-17T12:42:50.794Z] [INFO] Remove debug/release signing properties

[2019-05-17T12:42:50.794Z] [INFO] Zipping application source...

[2019-05-17T12:43:09.389Z] [INFO] Application was not successfully generated!

[2019-05-17T12:43:09.390Z] [INFO] Execution time: 191711ms

Adam Esterle wrote:

OneSignal Plugin Error when generating Android mobile app. Says "

The following errors have occurred:• In Android on 2019-05-17 at 08:43:25 - An unexpected error has occurred while packaging your application. Please try again. If the problem persists, contact OutSystems Support."



Progress bar gets to the end, then pauses, then throws that error.

-Installed OneSignal from forge

-Works on iOS build

-Android build fails


[2019-05-17T12:42:40.101Z] [INFO] Applying plugins in the config.xml file...

[2019-05-17T12:42:40.101Z] [INFO] Plugin Id: https://github.com/OutSystems/OneSignal-Cordova-SDK.git#2.4.5-OS

[2019-05-17T12:42:40.102Z] [INFO] Plugin Action: add

[2019-05-17T12:42:43.700Z] [INFO] Getting signing keys...

[2019-05-17T12:42:43.749Z] [INFO] Building application package...

[2019-05-17T12:42:50.793Z] [INFO] Checking application package...

[2019-05-17T12:42:50.793Z] [ERROR] Unable to locate the application package!

[2019-05-17T12:42:50.793Z] [ERROR] Unable to locate the application package!

[2019-05-17T12:42:50.794Z] [ERROR] Build failed with the following error: An unexpected error has occurred while packaging your application. Please try again. If the problem persists, contact OutSystems Support.

[2019-05-17T12:42:50.794Z] [INFO] Remove debug/release signing properties

[2019-05-17T12:42:50.794Z] [INFO] Zipping application source...

[2019-05-17T12:43:09.389Z] [INFO] Application was not successfully generated!

[2019-05-17T12:43:09.390Z] [INFO] Execution time: 191711ms


Hi Adam,

Please try cloning your application, and generate your android build again, this should work if your ios build generated successfully.


cheers,

Phiwo  

Hello, Adam,

I take it you are using version 3.0.0 of the OneSignal plugin, right?

Bear in mind that version is made for MABS 5 (currently in Beta), hence being marked as "Under Development". Unless you are using MABS 5 to generate your mobile app (by selecting it on Service Center, as described here), you will need to the latest stable version of the plugin.

Did this solve it for you?

Best regards,

Carlos

Carlos Simões wrote:

Hello, Adam,

I take it you are using version 3.0.0 of the OneSignal plugin, right?

Bear in mind that version is made for MABS 5 (currently in Beta), hence being marked as "Under Development". Unless you are using MABS 5 to generate your mobile app (by selecting it on Service Center, as described here), you will need to the latest stable version of the plugin.

Did this solve it for you?

Best regards,

Carlos

No, I was using 2.1.0 in a personal environment (which I think is on MABS 5)


Also, I cannot clone as of now because it froze my Mobile App generation and it has said "Preparing to generate Android Mobile App..." for over 30 minutes


Ok, you are definitely using MABS 5, which means you need version 3.0.0 (as stated here).

About the error: this can happen on rare occasions; the quick workaround is to trigger a generation request for another mobile app. This should either start or timeout the one that is currently stuck.

If you are not able to surpass it, we're going to need to have a closer look a it. Would you open a support case if comes to that, please?

Do let us know how things went. :)

Best regards,

Carlos

Carlos Simões wrote:

Ok, you are definitely using MABS 5, which means you need version 3.0.0 (as stated here).

About the error: this can happen on rare occasions; the quick workaround is to trigger a generation request for another mobile app. This should either start or timeout the one that is currently stuck.

If you are not able to surpass it, we're going to need to have a closer look a it. Would you open a support case if comes to that, please?

Do let us know how things went. :)

Best regards,

Carlos


Thank you for the response.

I downloaded 3.x for OneSignal

I tried another app, but that one was stuck hanging too. They have been hanging (including any timers that have triggered) for about 4 hours or so now. I opened a support ticket

https://www.outsystems.com/SupportPortal/CaseShow.aspx?CaseId=2164558

Hi,


Any news on this problem? I already download the version 3.0 and the mabs is on version 5.0 but i get always an error trying to generate the android package.

When removing OneSignal the generate package works great. I already had this plugin working on OS10, we are migrating to OS11 and in the apps generate i got this problem.


FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find any version that matches com.google.android.gms:strict-version-matcher-plugin:[15.0.0, 16.0.0).
  Versions that do not match:
    - 1.2.0
    - 1.1.0
    - 1.0.3
    - 1.0.2
    - 1.0.1
    - + 1 more
  Required by:
      project :app > com.google.gms:google-services:4.2.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org



Thank you

Hi,

Just to give more information, this problem happens when using One Signal and Firebase Mobile, if I remove one of them the apk is generated without problems.

Using the last version's of One Signal and Firebase Mobile.


Thank you

Hi Hugo, 


Is the Firebase Plugin, that you’re currently using, locking the Google support libraries version? The libraries that are defined as a dependency in the plugin. Looking for the error seems that a specific version is needed but one of the plugins is overriding that version.


Thanks. 

Hi Vitor,


I'm using the FIrebase Mobile that use the https://github.com/TruewindIT/cordova-plugin-firebase#1.6, I don't know if is the FIrebase Mobile ou OneSignal that are locking, since when alone they work great.

I have some app's that don't need notification and are using the Firebase Mobile and only one that use both plugins, but after removing Firebase Mobile the apk generates without problems.

I will try to find witch one is locking the libraries..

Thank you for the feedback.