Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Erratic issue: Uncaught TypeError: undefined is not a function

I am not looking for support on custom JS or any plugins via this query, but I am seeking resolution of this issue that is both confusing and frustrating.

Things were working perfectly fine with my photoSwipe implementation on which I had spent quite a bit of time fine-tuning. After that, I hadn't touched or re-tested this part of my implementation until about a few weeks ago.

I now get "Uncaught TypeError: undefined is not a function" notification (screenshot # 1 attached) that points to screenshot #2. I've included klass (https://github.com/ded/klass) in the JavaScript section of the project.

My issue is that things are absolutely fine at times (iOS device as well as browser), while at others the project runs into above issue: the browser gives the above error and Xcode doesn't but in both cases the end-behavior is erroneous in my app: I've tested over the course of a week. Are there changes in Appery build that are causing this to happen? If so if it possible to make the build stable or suggest a workaround?

I'd appreciate your help in resolution of the matter.
Regards.

Image

Image

Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Erratic issue: Uncaught TypeError: undefined is not a function

On a closer look into the issue, I am noticing that the problem started surfacing up between the time window 2:40pm and 8:15pm Pacific times Sunday Jan 11. All versions prior to this seem to exhibit correct behavior and versions later than that face the errors in screenshots above, when no modifications related to described functionality or plugins were made.

Furthermore what is strange is that when I take my latest version of app: RanzoV20 (exhibiting above error), make a back-up of it and port it to a entirely new app bundle, everything seems to work fine in the new app (this is not a permanent solution though, as I need this app slot).

Can you help fix the issue?
Regards.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Erratic issue: Uncaught TypeError: undefined is not a function

Hi Cody,

To be sure that i see in the correct app - please give us your goal(with problem) app public link and specify how we can reproduce it..

We need to test it.

Regards.

Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Erratic issue: Uncaught TypeError: undefined is not a function

Hi Yurii,

Sure. The goal is to rectify the error as indicated in the screenshots attached with my first message. The relevant project is RanzoV20 (you should have the login credentials from our previous interactions). The back up project as indicated in my second note above is Ranzo_test (it is error free) which was created from latest version of RanzoV20 (as of today). If you have further questions let me know. To test on browser you can set TEST_DEVICE to false in Utilities JS asset and to test on device (iOS only because of iTunes functionality) set it to true.

Regards.

Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Erratic issue: Uncaught TypeError: undefined is not a function

We are unfortunately stuck with whether to proceed with the version restored from back-up or continue development on the original app (that has the error).There are plugins we have that need to installed everytime when versions are restored from back up, so the process is laborious.

What is our tentative time estimate on resolving this issue?: this will help us plan.

Regards.

Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Erratic issue: Uncaught TypeError: undefined is not a function

I think we might have been able to pinpoint what the problem is. Every time the current version of the project is restored from a previous version, the error described in my original message appears (e.g. this just happened with project Ranzo_test). When this is not the case (e.g. when the project is newly created from a back-up and plugins restored) the error does not show up.

By when do you expect to help resolve this problem? Apparantly its a bug, so hopefully this will be largely beneficial to Appery. Personally for us it is causing a huge inconvenience and impediments with the development process.

Thanks!

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Erratic issue: Uncaught TypeError: undefined is not a function

Hello,

Problem is that klass framework have not had enough time to initialize itself, that is why other global methods haven't found it in the scope.
http://gyazo.com/db64eb9bd687bbda4a99...
Pure JavaScript, Appery.io modifications has nothing to do with it.

Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Erratic issue: Uncaught TypeError: undefined is not a function

Which version have you tested? If it is RANZO_HOME, its a version restored from back up and has no issues whatsoever as I indicated above (if it were a klass loading issue it should show up in at least one of the tests). To replicate the problem, take the backup of this project and create a new one, create a second version of this new project created from backup and then do a version restore, you will notice the error right away. After this step, even if it is a klass loading issue I am afraid its has everything to do with Appery.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Erratic issue: Uncaught TypeError: undefined is not a function

Hello Cody,

Sorry for the radio silence here. I followed your steps: restored RANZO_HOME from a backup, create a new version of this project and then restore the old version and I kind of don't mind the errors. Could you please clarify, am I doing something wrong? Also please detail the credentials, because those that you've sent to us early seems to be invalid anymore. And according to the other versions of your app (like Ranzo V20) seems that the main problem of it is in the code initialization.

Cody Blue
Posts: 0
Joined: Sun Aug 25, 2013 2:11 am

Erratic issue: Uncaught TypeError: undefined is not a function

Evgene - I am not sure if I follow well. The process for reproducing the problem is correct. After the restore, are you getting the console error as in the screenshot in my first post? Is so, I did as well. The problem is that with the error,functionality of the app relating to photoSwipe gets broken, and hence the app can't display pictures well. The credentials should not have changed, these work for me: I'll resend these anyway to support@appery.

Please advise of solution here.

Return to “Issues”