Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Background runner plugin: backgroundrunner.dispatchEvent error

Open
#62 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Domain
mobile

Research direction

Start by checking the runner.js location and the BackgroundRunner settings in capacitor.config.ts, then reproduce the backgroundrunner.dispatchEvent error on Android and iOS. Compare the configured src path with the project layout and inspect the linked screenshot for the exact failure. Done means the plugin starts and runs the configured checkIn event correctly.

Written by the indexing model from the issue text.

Description

Bug Report

Plugin(s)
"@capacitor/background-runner": "^1.0.5",
Capacitor Version

@capacitor/cli: 5.0.5
@capacitor/core: 5.0.5
@capacitor/android: 5.0.5
@capacitor/ios: 5.0.5

Platform(s)

Android, ios

Current Behavior

I'm using capacitor in a ionic+ stencil application

I'm not able to start correctly BackgroundRunner plugin

This is my runner.js location

Screenshot 2023-10-30 alle 14 58 49

this is my capacitor.config.ts

{
  "appId": "com.myapp.app",
  "appName": "MyApp",
  "webDir": "www",
  "server": {
    "androidScheme": "https"
  },
  "ios": {
    "handleApplicationNotifications": false
  },
  "plugins":{
    "BackgroundRunner": {
      "label": "com.myapp.app.check",
      "src": "runner.js",
      "event": "checkIn",
      "repeat": true,
      "interval": 2,
      "autoStart": false
    }
  }
}

And I have this error

Screenshot 2023-10-30 alle 15 01 33

Is a problem cause by a wrong path for the runner.js file or something else?
I'm not able to make it work!

Expected Behavior

Plugin runs correctly

Dominant language
C
Stars
57
Forks
37
Avg merge
3d 17h
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ionic-team/capacitor-background-runner

All issues in ionic-team/capacitor-background-runner

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.