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

Error during running with production flag on android device/ emulator #16

Open
pradipchitrakar opened this issue Aug 6, 2020 · 4 comments

Comments

@pradipchitrakar
Copy link

I just cloned this project and tried to run the project with production flag as below:

ionic cordova run android --prod

On running the above command, I receive following error while inspecting my console using chrome://inspect/#devices.

main-es2015.64696207092e484412ff.js:1 ERROR Error: Uncaught (in promise): ConnectionNotFoundError: Connection "default" was not found. ConnectionNotFoundError: Connection "default" was not found. at new t (main-es2015.64696207092e484412ff.js:1) at e.get (main-es2015.64696207092e484412ff.js:1) at Ft (main-es2015.64696207092e484412ff.js:1) at n.<anonymous> (13-es2015.9c3bd4536a48a817c0c2.js:1) at Generator.next (<anonymous>) at main-es2015.64696207092e484412ff.js:1 at new P (polyfills-es2015.afb85174554b9f1d01f0.js:1) at c (main-es2015.64696207092e484412ff.js:1) at n.runDemo (13-es2015.9c3bd4536a48a817c0c2.js:1) at ngOnInit (13-es2015.9c3bd4536a48a817c0c2.js:1) at k (polyfills-es2015.afb85174554b9f1d01f0.js:1) at new P (polyfills-es2015.afb85174554b9f1d01f0.js:1) at c (main-es2015.64696207092e484412ff.js:1) at n.runDemo (13-es2015.9c3bd4536a48a817c0c2.js:1) at ngOnInit (13-es2015.9c3bd4536a48a817c0c2.js:1) at lt (main-es2015.64696207092e484412ff.js:1) at ut (main-es2015.64696207092e484412ff.js:1) at st (main-es2015.64696207092e484412ff.js:1) at Ar (main-es2015.64696207092e484412ff.js:1) at Mr (main-es2015.64696207092e484412ff.js:1) Kt @ main-es2015.64696207092e484412ff.js:1 SQLitePlugin.js:175 OPEN database: __mydatabase SQLitePlugin.js:179 OPEN database: __mydatabase - OK SQLitePlugin.js:226 CLOSE database: __mydatabase SQLitePlugin.js:229 closing db with transaction queue length: 0 SQLitePlugin.js:136 cannot start next transaction: database not open main-es2015.64696207092e484412ff.js:1 ERROR Error: Uncaught (in promise): Error: Entity metadata for e#posts was not found. Check if you specified a correct entity object and if it's connected in the connection options. Error: Entity metadata for e#posts was not found. Check if you specified a correct entity object and if it's connected in the connection options. at main-es2015.64696207092e484412ff.js:1 at Array.forEach (<anonymous>) at e.computeInverseProperties (main-es2015.64696207092e484412ff.js:1) at main-es2015.64696207092e484412ff.js:1 at Array.forEach (<anonymous>) at e.build (main-es2015.64696207092e484412ff.js:1) at e.buildEntityMetadatas (main-es2015.64696207092e484412ff.js:1) at e.buildMetadatas (main-es2015.64696207092e484412ff.js:1) at e.<anonymous> (main-es2015.64696207092e484412ff.js:1) at main-es2015.64696207092e484412ff.js:1 at k (polyfills-es2015.afb85174554b9f1d01f0.js:1) at polyfills-es2015.afb85174554b9f1d01f0.js:1 at polyfills-es2015.afb85174554b9f1d01f0.js:1 at l.invoke (polyfills-es2015.afb85174554b9f1d01f0.js:1) at Object.onInvoke (main-es2015.64696207092e484412ff.js:1) at l.invoke (polyfills-es2015.afb85174554b9f1d01f0.js:1) at a.run (polyfills-es2015.afb85174554b9f1d01f0.js:1) at polyfills-es2015.afb85174554b9f1d01f0.js:1 at l.invokeTask (polyfills-es2015.afb85174554b9f1d01f0.js:1) at Object.onInvokeTask (main-es2015.64696207092e484412ff.js:1) Kt @ main-es2015.64696207092e484412ff.js:1

This happens only on production build.

@pradipchitrakar
Copy link
Author

Untitled

@HeikoKanzler
Copy link

@pradipchitrakar Could you solve your problem? I am still struggeling of using TypeOrm for a Ionic project.

@pradipchitrakar
Copy link
Author

@HeikoKanzler Are you getting the same problem in production? If yes, I had to change optimization to false in angular,json for production build which is not the best solution but I could not get any solution from community till now. Also, the project does not run with type orm version 0.2.25, so make sure you are using typeorm version 0.2.24 or less.

@HeikoKanzler
Copy link

Thanks @pradipchitrakar, I just realized five minutes ago the issue with the Postgress-Driver and I am about to try it now with 0.2.24. Unfortunately, blank projects work, but adding TypeOrm to my existing project completely fails with numerous issues.

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

No branches or pull requests

2 participants