Everlive is not defined error

6 posts, 1 answers
  1. Garling
    Garling avatar
    8 posts
    Member since:
    May 2014

    Posted 09 Jan 2015 Link to this post

    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. 
  2. Answer
    Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 12 Jan 2015 Link to this post

    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.
     
  3. Garling
    Garling avatar
    8 posts
    Member since:
    May 2014

    Posted 12 Jan 2015 in reply to Anton Dobrev Link to this post

    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)


  4. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 15 Jan 2015 Link to this post

    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.
     
  5. Martin
    Martin avatar
    2 posts
    Member since:
    Jun 2015

    Posted 30 Jun 2015 in reply to Anton Dobrev Link to this post

    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

  6. George
    Admin
    George avatar
    500 posts

    Posted 01 Jul 2015 Link to this post

    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.
     
Back to Top