Comments (8)
👋
Unfortunately, I am unable to reproduce your issue. When running the browser example locally and reading all data from a database with complex/long columns, everything works fine.
Looking at the code of readInt32LE
, I am not sure why it would fail for offset
being undefined as the first line (offset = offset >>> 0
) turns the undefined
to 0
which passes the offset check.
I have in mind though that I ran into some issues like this before. But I'd like to be able to reproduce the issue myself before updating the code.
from mdb-reader.
this is the same thing I was seeing in: #207 (comment)
...i thought it was a webpack issue, but tried with a setup similar to ahaganDEV
my workaround was to add the zero index when reading from the buffers in:
\src\data\bigint.ts
from mdb-reader.
@sspa-dhayes Could you provide a sample repo or code sandbox so I can reproduce the issue? For me things worked in the browser :(
That way I can also add tests to avoid this from happening in the future (by adding tests/linting).
I am happy to release a new version once I was able to reproduce. The required changes seem to be quite minimal.
from mdb-reader.
@ahaganDEV @sspa-dhayes I am very happy to update this package to fix your issue. But first, I'd like to be able to reproduce it. I tried to use the package within the browser and everything worked for me.
I only want to prevent releasing a "fix" to an error that is actually caused by webpack (config) and not of this package.
from mdb-reader.
I don't believe the issue is webpack? When debugging within the browser, I can confirm that it is using the Buffer package. I forked the mdb-library library and amended some of the functions that interact with Buffer and worked perfectly fine. Chaging:
export function readComplexOrLong(buffer: Buffer): number {
return buffer.readInt32LE();
}
to:
export function readComplexOrLong(buffer: Buffer): number {
return buffer.readInt32LE(0);
}
from mdb-reader.
I tried to reproduce the issue by moving the browser example to webpack: https://github.com/andipaetzold/mdb-reader-issue-218.I don' receive any errors when loading a database.
Can you please check what code is executed when calling readInt32LE
. Is it really this: https://github.com/feross/buffer/blob/795bbb5bda1b39f1370ebd784bea6107b087e3a7/index.js#L1309-L1317 ? Or are you maybe using an older version of the package where the offset doesn't default to 0.
from mdb-reader.
Closing because I cannot reproduce the issue.
Feel free to reopen if you can provide a repo or similar that shows the issue.
from mdb-reader.
@ahaganDEV If you are still having this issue - my post to #207 worked for me. Webpack/CRA was not using the buffer package. Apparently Webpack 4 shims some nodejs functions on its own...
from mdb-reader.
Related Issues (20)
- Wrong Data Parsed HOT 4
- Floating point issue in datetime parsing HOT 2
- Decrypt all Codecs
- Error with nodejs example HOT 3
- [V3] Used named import for `fast-xml-parser` HOT 4
- Encoding Problem HOT 4
- [browser] Use of operator ?? and ?. HOT 4
- GMT Problem HOT 6
- Uncaught RangeError: offset is not uint HOT 4
- Cannot read a table with a byte field HOT 10
- Unable to import the package in Nestjs HOT 1
- Can't Import it HOT 1
- Linux: Unexpected token '?' HOT 2
- unable to build browser example HOT 2
- can not compile when my typescript version is 3.1.6 HOT 1
- Enhancement: Native ESM modules using CDN for browser example HOT 1
- Data loss for string fields over 1893 characters HOT 5
- Browser import issue HOT 8
- Security: upgrade package fast-xml-parser HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdb-reader.