storesafe / cordova-sqlite-storage

A Cordova/PhoneGap plugin to open and use sqlite databases on Android, iOS and Windows with HTML5/Web SQL API
Other
2.15k stars 714 forks source link

"cordova-sqlite-storage-dependencies/sqlite3.c" error when building for ios #931

Open CodeWithOz opened 4 years ago

CodeWithOz commented 4 years ago

When trying to build for ios, I get this error:

plugins/cordova-sqlite-storage/node_modules/cordova-sqlite-storage-dependencies/sqlite3.c" not found!

Truncated console output:

...
Reinstalling missing plugin cordova-sqlite-storage in ios platform
Beginning processing of action stack for ios project...
Action stack processing complete.
pods.json found in platforms/ios
Podfile found in platforms/ios
Beginning processing of action stack for ios project...
Error during processing of action! Attempting to revert...
Uh oh!
"/Users/runner/runners/2.169.0/work/[user]/plugins/cordova-sqlite-storage/node_modules/cordova-sqlite-storage-dependencies/sqlite3.c" not found!
CordovaError: Uh oh!
"/Users/runner/runners/2.169.0/work/[user]/plugins/cordova-sqlite-storage/node_modules/cordova-sqlite-storage-dependencies/sqlite3.c" not found!
    at copyFile (/Users/runner/runners/2.169.0/work/[user]/platforms/ios/cordova/lib/plugman/pluginHandlers.js:310:36)
    at copyNewFile (/Users/runner/runners/2.169.0/work/[user]/platforms/ios/cordova/lib/plugman/pluginHandlers.js:339:5)
    at installHelper (/Users/runner/runners/2.169.0/work/[user]/platforms/ios/cordova/lib/plugman/pluginHandlers.js:260:13)
    at install 
(/Users/runner/runners/2.169.0/work/[user]/platforms/ios/cordova/lib/plugman/pluginHandlers.js:35:13)
    at ActionStack.process (/Users/runner/runners/2.169.0/work/[user]/platforms/ios/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/Users/runner/runners/2.169.0/work/[user]/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
    at PluginManager.addPlugin (/Users/runner/runners/2.169.0/work/[user]/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js:144:17)
    at Api.addPlugin (/Users/runner/runners/2.169.0/work/[user]/platforms/ios/cordova/Api.js:245:10)
    at /Users/runner/runners/2.169.0/work/[user]/node_modules/cordova-lib/src/cordova/prepare.js:170:32
    at _fulfilled (/Users/runner/runners/2.169.0/work/[user]/node_modules/q/q.js:854:54)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! com.app.name@1.0.1 install-ios-platform: `cordova platform add ios@5.1.1 "--verbose"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the com.app.name@1.0.1 install-ios-platform script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/runner/.npm/_logs/2020-04-21T23_31_08_021Z-debug.log
##[error]Process completed with exit code 1.

Let me know if there's any other info I can provide. Thanks!

CodeWithOz commented 4 years ago

I ended up trying to manually download the missing files from their repo and that allowed me to get past the error. However, I expect that files would get downloaded correctly by the plugin add step, because apparently that happens correctly with all other plugins we use. Although manually downloading the files is a solution for me, I'm leaving this issue open because my solution is a hack and the correct functionality appears to be broken.

brodycj commented 4 years ago

This plugin has a post install script that would automatically fetch the cordova-sqlite-storage-dependencies package that is needed. This will not work with systems such as PhoneGap Build, as I have documented. I suspect this script is not working with your build system for some reason.

CodeWithOz commented 4 years ago

Hmm okay thanks. I haven't had time to investigate, but I'm getting this error from the GitHub Actions CI. Don't know what difference that makes. I don't get the error when building for Android using Github Actions either.