apache / apache/cordova-ios

Module XXX does not exist

Open
#562 10 comments 1 reaction 0 assignees View on GitHub
support
Dominant language
JavaScript
Stars
2.2k
Forks
1k
Avg merge
12h 11m
Merged PRs (30d)
18

Description

# Bug Report

## Problem

I have a `window.onerror` err capture. In both cordova-ios 4.5.5 and 5.0.0 I get the following errors reported sometimes on load. I've been unable to reproduce on test devices or in ios simulator. It has a few different modules listed too (see below). cordova-android on the same install does not display similar issues. I am using https://github.com/mzealey/cordova-plugin-ionic-webview as replacement webview. I am including [cordova_plugins.js](https://github.com/apache/cordova-ios/files/2923484/cordova_plugins.txt) but as this is a transient issue and I cannot see any obvious reason from the code why it would hit an error I don't know that this would be useful. Can you suggest anything to help debug this further?

```
error_message: Error: Module cordova-plugin-background-download.BackgroundDownloader does not exist.
frames:
- addEntry()@http://localhost:8080/XXX.app/www/cordova.js:1255:24
- clobbers()@http://localhost:8080/XXX.app/www/cordova.js:1265:13
- onScriptLoadingComplete()@http://localhost:8080/XXX.app/www/cordova.js:1903:38
- scriptLoadedCallback()@http://localhost:8080/XXX.app/www/cordova.js:1936:36

```

User agents reporting this are:

```
Mozilla/5.0 (iPad; CPU OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60
Mozilla/5.0 (iPad; CPU OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15G77
Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60
Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15G77
Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16C101
Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16D57
```
Errors, always with same stack trace are variously (but usually the first):

```
Error: Module cordova-plugin-background-download.BackgroundDownloader does not exist.
Error: Module cordova-plugin-file.Entry does not exist.
Error: Module cordova-plugin-file.Flags does not exist.
Error: Module cordova-plugin-file.LocalFileSystem does not exist.
Error: Module cordova-plugin-inappbrowser.inappbrowser does not exist.
Error: Module cordova-plugin-statusbar.statusbar does not exist.
```

## Checklist

- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above

Contributor guide

Open the contributing guide

Research direction

Start by reading the module-loading path in www/cordova.js around addEntry(), clobbers(), onScriptLoadingComplete(), and scriptLoadedCallback(), then compare it with the attached cordova_plugins.js. The issue provides no reproduction or test target; done would require explaining why the listed modules are intermittently missing and identifying a reliable diagnostic or fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, javascript
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
24/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.