Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cordova-sqlite-ext and cordova-sqlite-storage [UNDEFINED BEHAVIOR] #719

Open
uselessai opened this issue Oct 25, 2017 · 7 comments
Open

Comments

@uselessai
Copy link

When I install this 2 plugins I am getting this error in iOS. And I need cordova-sqlite-ext because I am using a prepopulated database.. In android works perfectly..

[ERROR] An error occurred while running cordova build ios (exit code 1):

(truncated) ... kpxoqckl/Build/Intermediates.noindex/Part App.build/Debug-iphonesimulator/Part 
App.build/Objects-normal/x86_64/sqlite3-408C0FE16FBB7785.o
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-9C5901A687714452.o
duplicate symbol _sqlite3_malloc64 in:
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-408C0FE16FBB7785.o
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-9C5901A687714452.o
duplicate symbol _sqlite3_realloc64 in:
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-408C0FE16FBB7785.o
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-9C5901A687714452.o
duplicate symbol _sqlite3_result_zeroblob64 in:
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-408C0FE16FBB7785.o
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-9C5901A687714452.o
duplicate symbol _sqlite3_result_blob64 in:
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-408C0FE16FBB7785.o
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-9C5901A687714452.o
duplicate symbol _sqlite3_wal_checkpoint_v2 in:
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-408C0FE16FBB7785.o
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-9C5901A687714452.o
duplicate symbol _sqlite3_create_function_v2 in:
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-408C0FE16FBB7785.o
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-9C5901A687714452.o
duplicate symbol _sqlite3_prepare_v2 in:
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-408C0FE16FBB7785.o
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-9C5901A687714452.o
duplicate symbol _sqlite3_create_module_v2 in:
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-408C0FE16FBB7785.o
     
/Users/yincany/Library/Developer/Xcode/DerivedData/Part_App-hdkeuasuubywidegyrrakpxoqckl/Build/Intermediates.noindex/Part 
App.build/Debug-iphonesimulator/Part App.build/Objects-normal/x86_64/sqlite3-9C5901A687714452.o
ld: 211 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
	Ld build/emulator/Part\ App.app/Part\ App normal x86_64
(1 failure)
Error: Error code 65 for command: xcodebuild with args: 
-xcconfig,/Users/yincany/Desktop/PartApp/Client/platforms/ios/cordova/build-debug.xcconfig,-workspace,Part 
App.xcworkspace,-scheme,Part App,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS 
Simulator,name=iPhone 
SE,build,CONFIGURATION_BUILD_DIR=/Users/yincany/Desktop/PartApp/Client/platforms/ios/build/em
@ergurjeet
Copy link

I had faced similar issue, then performed following steps (not sure which one fixed the issue) and now it's working fine.

  1. Updated dependencies as per https://github.com/ionic-team/ionic/blob/master/package.json. Also a devDependency @ionic/app-scripts to 3.0.1.
  2. Reinstalled cordova-sqlite-storage and cordova-sqlite-ext plugins
  3. Removed and added the platform again

@brodycj
Copy link
Contributor

brodycj commented Oct 26, 2017

Same question raised in brodycj/cordova-sqlite-ext#67, same answer:

It is not possible to install multiple sqlite plugins. Duplicate symbols will result. This will be documented as a pitfall.

@brodycj
Copy link
Contributor

brodycj commented Nov 12, 2017

I just raised apache/cordova-discuss#81 to safeguard against such a combination in the Cordova framework.

@uselessai
Copy link
Author

Ok.. if I only install the cordova-sqlite-ext I get the next error..

CDVPlugin class SQLitePlugin (pluginName: SQLitePlugin) does not exist.
2017-11-23 20:16:42.092 Part App[80809:2136810] ERROR: Plugin 'SQLitePlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2017-11-23 20:16:42.094 Part App[80809:2136810] FAILED pluginJSON = ["SQLitePlugin1865426559","SQLitePlugin","open",

@brodycj
Copy link
Contributor

brodycj commented Apr 19, 2018

@DetoloX brodybits / cordova-sqlite-ext-bootstrap-starter-app is the recommended starting point for an app using the cordova-sqlite-ext plugin version; please ask in litehelpers / Cordova-sqlite-help / issues in case of further troubles.

@brodycj brodycj closed this as completed Apr 19, 2018
@brodycj brodycj changed the title cordova-sqlite-ext and cordova-sqlite-storage cordova-sqlite-ext and cordova-sqlite-storage [UNDEFINED BEHAVIOR] Apr 25, 2018
@brodycj
Copy link
Contributor

brodycj commented Apr 25, 2018

In case of multiple sqlite plugins installed the behavior should be considered UNDEFINED. It may lead to compile error, runtime error, data loss due to multiple sqlite problem discussed in #626, other forms of data loss, etc. etc. Will be documented.

@Samide47
Copy link

how you attached a sqlite pre populated database to ionic app ?
I'm facing this trouble two weeks ago,
I have a pre filled database and I don't want to create the tables from scratch
Please I will appreciate your help
Thank you
@yincany

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

No branches or pull requests

4 participants