-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Intermittent error NJS-103: unexpected message type 2 received at position 11 of packet 44 #1642
Comments
Can you set the environment variable |
The message type (TNS_MSG_TYPE_DATA_TYPES) only occurs during the connection. Are there packets before packet 44 that were received? This is likely a continuation packet and that isn't being stitched together properly. We would need all packets up to packet 44 that were received for this particular request. (The ones before that would say that it was sent to the database and those aren't needed). |
ok, log all to .txt file |
Thanks. That is helpful. To make decoding a bit easier can you share the column types that you are fetching? |
I can send the data model, would you have an email to send it to? I wouldn't want to expose it here |
Yes, you can find my e-mail address here: https://pypi.org/project/oracledb/. From my initial decode it looks like there are 398 columns being fetched? Is that accurate? |
No need to send anything. I was able to figure out the source of the issue! |
Cool, is it easy to fix? Sorry, I wasn't at work to send the information. |
Yes, I believe so. I've sent a detailed message with what I believe is the solution to the ones who will implement it. The biggest hurdle will be replicating the issue but I have an idea for that, too. Stay tuned! |
Hi @joseviniciusnunes , diff --git a/lib/thin/protocol/messages/withData.js b/lib/thin/protocol/messages/withData.js
index 8a73eb1b..cbb0d247 100644
--- a/lib/thin/protocol/messages/withData.js
+++ b/lib/thin/protocol/messages/withData.js
@@ -148,13 +148,15 @@ class MessageWithData extends Message {
buf.skipUB1();
}
resultSet.metadata = [];
+ const metadata = [];
+ const queryVars = [];
for (let i = 0; i < statement.numQueryVars; i++) {
const variable = this.processColumnInfo(buf, i + 1);
if (prevQueryVars && i < prevQueryVars.length) {
this._adjustFetchType(prevQueryVars[i], variable);
}
- statement.queryVars.push(variable);
- resultSet.metadata.push(variable.fetchInfo);
+ queryVars.push(variable);
+ metadata.push(variable.fetchInfo);
}
let numBytes = buf.readUB4();
@@ -170,6 +172,8 @@ class MessageWithData extends Message {
buf.skipBytesChunked();
}
+ resultSet.metadata = metadata;
+ statement.queryVars = queryVars;
this.resultSetsToSetup.push(resultSet);
} |
good news, It worked on my development machine, I'm going to move up to the stage environment to perform more tests. Thanks. |
Thanks for the fix. We are struggeling with the same issue and can also confirm that the patch helped. |
@steeu This will be available in the upcoming node-oracledb 6.4 release. |
@steeu @joseviniciusnunes This has been fixed in node-oracledb 6.4 |
im using bun version 1.1.4 NJS-103: unexpected message type 2 received at position 11 of packet 25 the query is working fine in my sql developer |
Can you share the complete packet trace after setting the env, few details on the DB server version used and a minimal program which simulates the issue would help to debug further. |
Hello everyone, I have a problem when performing a very large SQL query, the error occurs intermittently, I saw that a problem last year was resolved, would it be the same problem, has it been fixed yet?
I updated to version 6.3.0, but without success, the error occurred intermittently and 90% of the time the same query was identical to the error.
What versions are you using? 6.3.0
Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
process.platform linux
process.version v18.17.0
process.arch x64
require('oracledb').versionString 6.3.0
require('oracledb').oracleClientVersionString undefined
Is it an error or a hang or a crash? error
What error(s) or behavior you are seeing?
unfortunately I can't paste the query here, it has more than 33000 characters
The text was updated successfully, but these errors were encountered: