Giter Site home page Giter Site logo

Comments (16)

PanayotCankov avatar PanayotCankov commented on July 19, 2024

Can you add the plugin using tns plugin add nativescript-background-http then delete the platforms folder and re-run for android? The fails seem to happen very early at obtaining com.alexbbb.uploadservice which seems the underlying native android implementation didn't make it to your app. Possible problems may be the plugin was added using npm install rather than tns plugin add, or the Android gradle may have mis-cached the metadata prior to adding this library.

Please write back if cleaning platforms and tns plugin add do not fix the problem so we can investigate it further.

from nativescript-background-http.

mikeres0 avatar mikeres0 commented on July 19, 2024

Which platforms folder? As in node_modules/nativescript-background-http/platforms or the platforms directory at the root of my project?

from nativescript-background-http.

PanayotCankov avatar PanayotCankov commented on July 19, 2024

The one at the root of your project.

from nativescript-background-http.

mikeres0 avatar mikeres0 commented on July 19, 2024

No luck unfortunately, I'm still receiving the same error message

from nativescript-background-http.

PanayotCankov avatar PanayotCankov commented on July 19, 2024

I can not reproduce the problem. Can you share the versions of the NativeScript framework you are using tns --version and provide the versions in the pakcage.json? Also do you test on device or emulator?

from nativescript-background-http.

mikeres0 avatar mikeres0 commented on July 19, 2024

My CLI version is 1.6.2 and the versions in my package.json are as follows:

{
    "nativescript": {
        "id": "org.nativescript.nextraworkplan2",
        "tns-ios": {
            "version": "1.6.0"
        },
        "tns-android": {
            "version": "1.6.2"
        }
    },
    "dependencies": {
        "nativescript-background-http": "0.0.3",
        "nativescript-insomnia": "^1.1.0",
        "nativescript-local-notifications": "^1.0.0",
        "nativescript-sqlite": "^1.0.7",
        "node-uuid": "^1.4.7",
        "tns-core-modules": "^1.6.0"
    }
}

I am testing on two physical devices; Samsung Galaxy S5 and iPad Air.

from nativescript-background-http.

PanayotCankov avatar PanayotCankov commented on July 19, 2024

iPad Air shouldn't generate a Cannot read property 'uploadservice' of undefined message. What is the error on iOS? Also what is the android version installed on the Galaxy S5? I think we have S5 and will give it a try but there may be differences in the API level.

from nativescript-background-http.

mikeres0 avatar mikeres0 commented on July 19, 2024

I may be wrong about iOS. As I don't have access to that device today I won't be able to confirm.

The android version of the S5 is 5.0. Okay, thank you.

from nativescript-background-http.

viniciodeltoro avatar viniciodeltoro commented on July 19, 2024

I have the exact same error in my nativeScript app, I'm using a Nexus 5X on the emulator. I tried deleting the platforms folder and adding the plugin.
Any ideas on how can I fix that?

Thank you

from nativescript-background-http.

anchetaWern avatar anchetaWern commented on July 19, 2024

same problem here. I tried installing with npm and tns plugin add but I still get the same error.

from nativescript-background-http.

chief10 avatar chief10 commented on July 19, 2024

Same error here. Running in Genymotion; Android 7.0

from nativescript-background-http.

viniciodeltoro avatar viniciodeltoro commented on July 19, 2024

I ended up using the regular HTTP module that angular 2 provides and uploading the image as a Based64 string in a JSON object. I convert back that string on the server side. That works very good but obviously it's not working in the backgroud

from nativescript-background-http.

joona avatar joona commented on July 19, 2024

I running into the same problem. Testing on Genymotion, Android 6.0 and on Nexus 6P with Android 7.0.

"nativescript": {
  "tns-android": {
    "version": "2.2.0"
  }
}

from nativescript-background-http.

Daxito avatar Daxito commented on July 19, 2024

+1
Same problem here, Using {N} 2.3.0, everything 2.3.0, real device, a galaxy S5, no ideas then?

from nativescript-background-http.

PanayotCankov avatar PanayotCankov commented on July 19, 2024

Try 2.4.0, aar has been replaced with include.gradle

from nativescript-background-http.

felixkrautschuk avatar felixkrautschuk commented on July 19, 2024

When updating to the latest version of this plugin (2.5.0), I get the same error message on Android.
Cannot read property 'uploadservice' of undefined

I am using tns-core-modules 2.5.0.

from nativescript-background-http.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.