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

Everlive is not defined error

5 Answers 312 Views
JavaScript SDK
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Garling
Top achievements
Rank 1
Garling asked on 09 Jan 2015, 04:05 PM
I am using the VS plugin and when I run the app in the sim and click on my upload button I keep getting, Everlive is not defined at scripts/main.js (line: 161). 

What I am trying to do is take a file off the device and send it to the Telerik Backend services. 

5 Answers, 1 is accepted

Sort by
0
Accepted
Anton Dobrev
Telerik team
answered on 12 Jan 2015, 03:00 PM
Hello Garling,

Thank you for posting to the Telerik Developer Forums.

This is a common error when the Backend Services (formerly known as Everlive) JavaScript SDK is not accessible or unavailable in your code. Could you please verify if you have referenced the Backend Services JavaScript SDK in your project? There are a few means to import the SDK in your project explained here.

If this is not the case, please, provide a sample project that illustrates the issue.

Let me know if you have questions.

Regards,
Anton Dobrev
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
Garling
Top achievements
Rank 1
answered on 12 Jan 2015, 03:28 PM
I made the changes and I have a couple of questions?
What should I have this set to: var fileURI = 'cdvfile://localhost/11290.csv'; // the retrieved URI of the file on the file system, e.g. using navigator.camera.getPicture() 
I have it pointing to my file, is this correct?

I am getting this error message now in VS: Error in error callback: FileTransfer1583399583 = TypeError: Cannot read property 'Id' of undefined at cordova.js (line: 473)


0
Anton Dobrev
Telerik team
answered on 15 Jan 2015, 10:16 AM
Hello Garling,

I am guessing that you are trying to upload a locally saved file on the device to Telerik Backend Services.

1. If your print the fileUri to the console, it should look something like:
var fileUri = 'file:///var/mobile/Containers/Data/Application/APPLICATION_ID_HERE/Library/files/myfilename.csv';

This is the path to the file on the local file system of the device. You should be able to retrieve it from the function that saves the CSV file to the device.

2. Probably this error derived from the invalid path used by the FileTransfer.

Let me know if you have further questions.

Regards,
Anton Dobrev
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
Martin
Top achievements
Rank 1
answered on 30 Jun 2015, 12:50 PM

Hello,

 I have a problem with everlive to. When i add 

<script src="js/vendor/everlive/src/everlive.debug.all.js" type="text/javascript"></script>

to my index.html, it is allmost as if Everlive is not loaded at all. When i try to create an Everlive object by calling new Everlive("apikey"),

i get ReferenceError: Everlive is not defined.

I'm building an app using Cordova and AngularJs.

When I write new Everlive in a script tag in index.html, it recognizes it, because in the pop up I can see what I need to add to initialize it. But even there, I still get the undefined error. What is going wrong? Can anyone help me please?

Regards

0
George
Telerik team
answered on 01 Jul 2015, 08:59 AM
Hello Martin,

Firstly, could you check which version of the SDK you are using? In the latest release - 1.4.0 we removed the everlive.debug.all.js file since the source maps are now independent files for everlive.js and everlive.all.js. Overall I would recommend you to download the latest version (preferably using bower) and check if the file is actually loaded (check the Network tab of the Developer Console for any 404 errors).

Next, I would recommend you to check the order in which your scripts are being loaded. E.g. if you are loading everlive after main.js it might not work, depending on your application's life-cycle.

If none of this helps I would need you to provide me with some sample code in order to allow me to better investigate your scenario. Optionally, use the Kendo Dojo.

Looking forward to hearing from you.

Regards,
George
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
Tags
JavaScript SDK
Asked by
Garling
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
Garling
Top achievements
Rank 1
Martin
Top achievements
Rank 1
George
Telerik team
Share this question
or