ionic-team / ionic-team/capacitor-background-runner

Background runner plugin: backgroundrunner.dispatchEvent error

Open
#62 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
56
Forks
36
Avg merge
4d 12h
Merged PRs (30d)
7

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](https://github.com/ionic-team/capacitor-plugins/assets/9347586/91f9cb9d-7359-4fe3-a4dc-0037fd1da311)

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.