This is a migrated thread and some comments may be shown as answers.

cordova undefined

2 Answers 51 Views
AppBuilder extension for Visual Studio
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
KC
Top achievements
Rank 2
KC asked on 19 Aug 2014, 07:58 PM
Greetings,

    I have recently taken over mobile development for my company and I am not very failure with the architecture of what an .app should look like. But, I have been messing around with it and I am getting a grasp on it. Yesterday, after I successfully compiled and tested the test app I shut down. This morning, I turned it on and now the app fails due to an error,
"Uncaught TypeError: Cannot call method 'hide' of undefined."
This was all working just fine yesterday and now it wont. Also, in the actual mobile application that I will be working, it throws a similar error but it is with the 'device' not the 'navigator' variables. This is very perplexing because everything worked fine and suddenly it is broken. It also seems that about every other compile, it throws a "cordova is not defined."
Sometimes it does that one, sometimes it does not.

Any help would be appreciated. I am running it in the VS extension, cordova version 3.5

Very respectfully,

Keith

**Note** I can run it on a device without any errors, seems to be local to the simulator.

2 Answers, 1 is accepted

Sort by
0
KC
Top achievements
Rank 2
answered on 20 Aug 2014, 01:57 PM
**Work-around**

So, I had to copy all the project files to a new solution... And it works now... Not sure why, but I guess the project did not like where it was living, so I moved it. If you can find a cause of this let me know. 
0
Iva Koevska
Telerik team
answered on 22 Aug 2014, 02:05 PM
Hi Keith,

Thank you for contacting Telerik support. We are glad that you have been able to find a workaround.

Another viable workaround, should you find the simulator becoming corrupted again is to clear the AppBuilder cache. After you have closed the simulator and the extension, you can go to %localappdata%\Telerik\BlackDragon and remove the Cache folder. This should cause the simulator, on next start, to reset and repair itself.

Usually, the reported behavior occurs when you run the VS extension and the Windows client simultaneously, or when a process locks one or more files in your project. 

We would appreciate any additional details about the original project, setup and situation with which you observed the issue, as this might help us identify the culprit and reduce the occurrence of such issues in the future.

Regards,
Iva Koevska
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
AppBuilder extension for Visual Studio
Asked by
KC
Top achievements
Rank 2
Answers by
KC
Top achievements
Rank 2
Iva Koevska
Telerik team
Share this question
or