-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Promises never get resolved in specific cases #6958
Comments
Stupid question and probably not the issue, but still curious: does putting a semi-colon in your queries change anything?
|
No, doesn't change anything. |
I have the same problem, sometimes it is work, but sometimes it just freeze there, not returning anything. |
This still happens on 0.2.34 |
I can't replicate it. Can you open a new issue with info on how you're replicating this issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue type:
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[x]
postgres
[ ]
cockroachdb
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[ ]
latest
[x]
@next
[ ]
0.x.x
(or put your version here)Steps to reproduce or a small repository showing the problem:
Sometimes promises just never resolve. At first I thought it might be related with running scripts with
ts-node
, however even when using pure JS the issue is the same.The freeze always happens when I try to perform a query after another query was performed without closing the connection. Here closing and re-connecting seems to avoid the bug, however I had another case where I tried saving an entity to a repository after performing a raw query and it also froze on the
await repository.save(...)
method, re-connecting did not fix it.Here's a code snippet:
The actual contents of the raw query do not seem to matter, it happens every time. The problem is probably related to raw queries since the problem didn't happen with repositories (until doing a raw query once, after that it does).
Also tried it without
await
by using.then(...)
callbacks, same outcome.The text was updated successfully, but these errors were encountered: