GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2017-04-03T20:57:08.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.2.0, alloy 1.9.10 |
Components | Builtins |
Labels | Alloy, Alloy_is_not_defined, Push_Notification |
Reporter | Investis |
Assignee | Feon Sua Xin Miao |
Created | 2016-04-29T14:13:59.000+0000 |
Updated | 2017-09-25T16:27:32.000+0000 |
I have an Android project integrated with _iamyellow.net_ Push Notification module.
Erroneous scenario generated by following steps.
1. App is closed manually in background
2. There is a notification in notification bar for the app
3. App is opened by tapping on the notification.
4. An error with "Alloy is not defined", sourced build/android/assets/alloy.js, is appeared.
Please refer screenshot in attachment.
5. App sticks at default screen after receiving error.
Please consider this as high priority issue.
Regards.
Hello, The issue is with this line of code in the alloy.js
Here, Alloy as a variable is not defined. It will be helpful for you if you query in iamyellow.net website. My suggestion would be using cloudpush module for push notification with Appcelerator. Regards, Sharif.
Sorry to say this [~sdarda], but how is using another module a viable solution to an actual Alloy bug? This isn't Stack Overflow where people are just _asking for ways_ to get around their problems. This is an actual ticket, raised by +a paying customer+, so it is not unreasonable to expect your responses to take this into consideration.
Hello, This is extremely urgent at our end to get this issue resolved asap. Can someone please help here to resolve this issue. Regards
Hello, The issue is with the alloy.js code. Can you please tell me where did you get the code. Is it provided by the iamyellow.net? If so, Maybe they can help you out. Thay are an independent company providing push notification support. Please contact their support person. We are also looking into it. Regards, Sharif.
Hi Sharif, Re - alloy.js , I have also mentioned the location of the file in (if you can review point 4) when I have registered bug ticket. alloy.js placed at *build/android/assets/alloy.js*. this file is being added with few functions by appcelerator studio at build time. There is a function _*exports.createStyle*_ in alloy.js, which has a condition as per the screenshot and causing the error when opening the app from a push notification. Please review _*exports.createStyle*_ function in attached alloy.js file with this ticket. I hope this would be helpful for further investigation. Regards,
After the app starts,
Alloy
is one of the globals which should be accessible byalloy.js
the core builtin client library. It looks like there might be an issue when the app is put in the background, then brought to the foreground. Probably the activities are being recreated? We'll look into this. In the mean time, one question: do you still see the same error if you kill the app and launch it again?Facing the same issue here, the error appear only when the app is killed, and launched via the click on the received push notification.
Same here. Using this module though: https://github.com/morinel/gcmpush
Is there any way to fix this temporarily, while we wait for a fix? For the missing Alloy references in lib-files, we can just do a require('alloy'), but as it is now, we are forced to remove all Alloy references in our tss-files. This is an extensive operation, that we would like to avoid.
This has been an obstruction for us and the source of multiple deadline push backs. We hope this issue can be moved up the queue of tasks.
PR: https://github.com/appcelerator/alloy/pull/819
Hi I am facing the same error some times on starting up the app. Which alloy.js file do I apply the changes to? I couldn't find the code need to be corrected in the alloy.js within the project. Could anybody help? I currently could not update Appcelerator, because the latest SDK 6.2.1 and 6.2.2 breaks my UI. I just want to fix this issue and release a stable version of our APP.
[~bwang@metroland], which version of Appc CLI are you using? The fix should be in latest CLI 6.2.3, it's independent of titanium SDK.
@Feon Sua Xin Miao, my appc -v shows 6.2.4 . Does that mean I just need to build in latest Appcelerator Studio, and use the previous Titanium SDK. The error should be gone?