GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — An uncaught Exception : Context.startForegroundService() · Issue #278 · NativeScript/nativescript-background-http

An uncaught Exception : Context.startForegroundService() #278

New issue
Copy link
New issue
Copy link
Open
Open
An uncaught Exception : Context.startForegroundService()#278
Copy link

Description

@EinatGit
EinatGit
opened on Dec 28, 2020
Issue body actions

Hello,
We are using nativescript-background-http on NativeScript with Angular to upload photos.
After 3-10 uploads (we've checked that each upload is ending before a new one begins) the APP is crashing and we get this error:

System.err: An uncaught Exception occurred on "main" thread.
System.err: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{3947ebe u0 org.nativescript.MyApp/net.gotev.uploadservice.UploadService}
System.err: 
System.err: StackTrace:
System.err: android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{3947ebe u0 org.nativescript.MyApp/net.gotev.uploadservice.UploadService}
System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2005)
System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
System.err:     at android.os.Looper.loop(Looper.java:223)
System.err:     at android.app.ActivityThread.main(ActivityThread.java:7656)
System.err:     at java.lang.reflect.Method.invoke(Native Method)
System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

The issue occur on:

  • Android 11
  • Devices : Google Pixel 2, Xiaomi Note 10 PRO

Version numbers:

-CLI 6.5.1
[email protected]
-tns-android": {
"version": "6.5.3"
}
nativescript-background-http is updated to the last one ^4.2.1

package.json:

{
  "nativescript": {
    "id": "My App",
    "tns-ios": {
      "version": "6.5.2"
    },
    "tns-android": {
      "version": "6.5.3"
    }
  },
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@angular/animations": "~8.2.0",
    "@angular/common": "~8.2.0",
    "@angular/compiler": "~8.2.0",
    "@angular/core": "~8.2.0",
    "@angular/forms": "~8.2.0",
    "@angular/http": "8.0.0-beta.10",
    "@angular/platform-browser": "~8.2.0",
    "@angular/platform-browser-dynamic": "~8.2.0",
    "@angular/router": "~8.2.0",
    "@nativescript/theme": "^3.0.1",
    "@ngx-translate/core": "^11.0.1",
    "@ngx-translate/http-loader": "^4.0.0",
    "@nstudio/nativescript-camera-plus": "^3.1.0",
    "@nstudio/nativescript-loading-indicator": "^1.0.0",
    "@nstudio/nativescript-pulltorefresh": "^2.0.0",
    "nativescript-angular": "^8.20.4",
    "nativescript-background-http": "^4.2.1",
    "nativescript-camera": "^4.4.0",
    "nativescript-datetimepicker": "^1.2.3",
    "nativescript-imagecropper": "^3.0.0",
    "nativescript-imagepicker": "^7.1.0",
    "nativescript-nfc": "4.0.1",
    "nativescript-permissions": "^1.3.8",
    "nativescript-plugin-firebase": "9.0.2",
    "nativescript-theme-core": "~1.0.4",
    "nativescript-ui-chart": "^7.1.1",
    "nativescript-ui-sidedrawer": "^8.0.1",
    "reflect-metadata": "~0.1.10",
    "rxjs": "^6.4.0",
    "tns-core-modules": "^6.3.2",
    "zone.js": "^0.9.1"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~8.2.0",
    "@nativescript/schematics": "~0.5.0",
    "@ngtools/webpack": "~8.2.0",
    "@types/jasmine": "^3.5.11",
    "nativescript-dev-webpack": "^1.4.1",
    "tns-platform-declarations": "6.0.1",
    "typescript": "~3.5.3"
  },
  "readme": "NativeScript Application"
}

Can you please help with this error and the way to fix it?
Thank you

Reacted by chimmelb

Activity

  1. chimmelb commented on Jan 4, 2021

    @chimmelb
    chimmelb
    on Jan 4, 2021
    More actions

    Nativescript plugins are being maintained elsewhere, and this looks like a duplicate bug of NativeScript/plugins#63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.