Closed GTCrais closed 2 years ago
1.11 and 1.12 (broken)
Hmm, does this still happen 1.11 and later?
How to get that result: node cli parse ...
, or by node project dependency?
I have placed a demo site for latest msgreader 1.12.0-alpha.2. You can check the latest decoder of msg reader.
https://hiraokahypertools.github.io/msgreader_demo/
source: https://github.com/HiraokaHyperTools/msgreader_demo
Workable on modern web browsers like Chrome/FireFox. This is a simple webapp using webpacked JavaScript (not WebAssembly).
1.11 and 1.12 (broken)
Hmm, does this still happen 1.11 and later? How to get that result:
node cli parse ...
, or by node project dependency?
Yes. By using node project dependency. Screeshot from online msgreader demo
This was the sequence of events, maybe this can help you:
1) 1.9.0 - working fine
2) Refactoring to 1.10.0:
https://github.com/HiraokaHyperTools/msgreader/commit/752dd4b65fc7f41ea13c0ee0f88983f1f6e6af22 https://github.com/HiraokaHyperTools/msgreader/commit/8fa9cbecf50908677b31d49d2a55735adb20af8a https://github.com/HiraokaHyperTools/msgreader/commit/5530d7d5cdbaafebfbe9ff631323e7cba66c5c92 https://github.com/HiraokaHyperTools/msgreader/commit/6f14101010bdbade3f9a049eed5f4963f54f0f0a https://github.com/HiraokaHyperTools/msgreader/commit/0731ae8057b2a37417ae8a67adb84321a016ee43 https://github.com/HiraokaHyperTools/msgreader/commit/f474d0233e8684c22e0e3229ca8acd735031d2ff https://github.com/HiraokaHyperTools/msgreader/commit/a5535cac633df1631a430db3abd56da5a597a10d https://github.com/HiraokaHyperTools/msgreader/commit/441bcd2dcc2c8042a13450349ff696fbbce3ade0 https://github.com/HiraokaHyperTools/msgreader/commit/84942ec98ab6a40fcf05bda82a97ba97fec0d24a https://github.com/HiraokaHyperTools/msgreader/commit/7689c425b5e1d7028e57fd98e010fbb8df889e59
3) Doc updates and docup.js (most likely irrelevant):
https://github.com/HiraokaHyperTools/msgreader/commit/8e40bc9e7e581d109c8d978ded59cede72b4500a https://github.com/HiraokaHyperTools/msgreader/commit/941ec2ca92e8a8803839b6d7570cb88f0b0bca59 https://github.com/HiraokaHyperTools/msgreader/commit/14571bff320cb22f98a6cedd53fa0f894b0df69a https://github.com/HiraokaHyperTools/msgreader/commit/022fa4e23aaefc85088ae1bfae882ef9ffc14190
4) 1.10.0 is released. Everything works, except compressedRtf
which is broken (incomplete Uint8Array
) - https://github.com/HiraokaHyperTools/msgreader/issues/19
5) 1.11.0 is released, which fixed compressedRtf
but broke a lot of the other fields which now come out as Uint8Array
instead of String
:
https://github.com/HiraokaHyperTools/msgreader/commit/9c99db2fc6595aa78e89cefa8a19efea375deb5f https://github.com/HiraokaHyperTools/msgreader/commit/dd20240e840ed190e59e4e31cf251d03035eef13 https://github.com/HiraokaHyperTools/msgreader/commit/43b72ea891c3abe383cf6311a0bbed7404c82029
More accurately, this line - https://github.com/HiraokaHyperTools/msgreader/commit/9c99db2fc6595aa78e89cefa8a19efea375deb5f#diff-df3542ef2be5d49cbfe3ab8237efe551439478c9dd3f8beec8337940efc39190R109
From my understanding, it moves 001e
out of TYPE_MAPPING
so nothing will ever be matched as string
.
It was either one of the 3 1.11.0
commits that broke something, or one of those 3 in combination with 1.10.0
refactoring.
Hi,
I want to verify the msg file you have tested. If you don't mind, could you send it to me? ku@digitaldolphins.jp
I'm surprised that Uint8Array
ed problem occurs on online version.
Unfortunately I cannot reproduce this yet!
I have tested with 16 test msg files listed on https://github.com/HiraokaHyperTools/msgreader/tree/master/test
None of them produced Uint8Array
ed outputs for text fields.
A memo.msg
A schedule.msg
attachAndInline.msg
longerDifat.msg
longerFat.msg
msgInMsg.msg
msgInMsgInMsg.msg
sent.msg
sent2.msg
Subject.msg
test1.msg
test2.msg
unicode1.msg
voteItems.msg
voteNo.msg
voteYes.msg
And also tested with: TestOuterEmail1.msg and TestOuterEmail2.msg
A memo.msg
:
MsgReader's test covers this kind of regression test too.
See test output √ exact match with pre rendered data (except on compressedRtf)
in part later.
If A memo.msg
doesn't produce expected JSON data, test will fail:
The test can be run by yarn
.
H:\Proj\msgreader>yarn
yarn install v1.22.4
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
$ npm run build && npm run test
> @kenjiuno/msgreader@1.12.0-alpha.2 build
> tsc
> @kenjiuno/msgreader@1.12.0-alpha.2 test
> npm run mocha
> @kenjiuno/msgreader@1.12.0-alpha.2 mocha
> set NODE_ENV=test && mocha
MsgReader
test1.msg
√ exact match with pre rendered data (except on compressedRtf)
√ compare rtf
test2.msg
√ exact match with pre rendered data (except on compressedRtf)
√ verify attachment: A.txt
√ compare rtf
msgInMsg.msg
√ exact match with pre rendered data (except on compressedRtf)
√ testMsgAttachment0 === testMsgAttachments0
√ re-parse and verify rebuilt inner testMsgAttachments0
√ compare rtf
msgInMsgInMsg.msg
√ exact match with pre rendered data (except on compressedRtf)
√ re-parse and verify rebuilt inner testMsgAttachments0
√ re-parse and verify rebuilt inner testMsgAttachments0AndItsAttachments0
√ compare rtf
Subject.msg
√ exact match with pre rendered data (except on compressedRtf)
√ compare rtf
sent.msg
√ exact match with pre rendered data (except on compressedRtf)
√ compare rtf
sent2.msg
√ exact match with pre rendered data (except on compressedRtf)
√ compare rtf
longerFat.msg
√ re-parse and verify rebuilt inner testMsgAttachments0
longerDifat.msg
√ re-parse and verify rebuilt inner testMsgAttachments0
attachAndInline.msg
√ exact match with pre rendered data (except on compressedRtf)
√ compare rtf (46ms)
voteItems.msg
√ exact match with pre rendered data (except on compressedRtf)
√ compare rtf
voteNo.msg
√ exact match with pre rendered data (except on compressedRtf)
voteYes.msg
√ exact match with pre rendered data (except on compressedRtf)
A schedule.msg
√ exact match with pre rendered data (except on compressedRtf)
√ compare rtf
A memo.msg
√ exact match with pre rendered data (except on compressedRtf)
√ compare rtf
Burner
Compare file contents among Burner/Reader
√ file size 4095
√ file size 4096
√ file size 8192
√ file size 64000
√ file size 64513
√ file size 129537
√ file size 1024 * 8192 (100ms)
√ file size 1024 * 8192 * 2 (199ms)
√ file size 1024 * 8192 * 3 (308ms)
toHexStr
√ tests
DataStream
√ little.readUint32
√ big.readUint32
√ little.offset.readUint32
√ big.offset.readUint32
√ little.buffer.readUint32
√ little.buffer.offset.readUint32
√ little.readUint32Array
√ little.readInt32Array
√ little.readUint16Array
√ little.readInt16Array
√ little.readUint32Array +offset
√ little.readInt32Array +offset
√ little.readUint16Array +offset
√ little.readInt16Array +offset
msftUuidStringify
√ basic
toHex
√ toHex1
√ toHex2
√ toHex4
59 passing (1s)
Done in 10.82s.
I want to distinguish whether this is msg file problem or MsgReader problem.
Unfortunately I can't provide the exact .msg
file which I'm using because it contains confidential data, but I will try to create one which can be used to reproduce the error.
The problem can't be the .msg
file because that exact file works fine with 1.9.0
version, and 1.10.0
version (except in this one the compressedRtf
is broken). The issue happens only with versions 1.11.0
and above.
Since I'm not familiar with the codebase of this project, I just want to re-confirm that 001e
is really supposed to be out of TYPE_MAPPING
here - https://github.com/HiraokaHyperTools/msgreader/commit/9c99db2fc6595aa78e89cefa8a19efea375deb5f#diff-df3542ef2be5d49cbfe3ab8237efe551439478c9dd3f8beec8337940efc39190R109 ?
In any case, I will try to find a non-confidential .msg
that causes the same error and provide it to you.
Thanks for patience, you helped this!
1.12.0-alpha.3
is published.
Also you can try msgreader_demo (msgreader@1.12.0-alpha.3)
.
https://hiraokahypertools.github.io/msgreader_demo/
Press F5 in case of older version is cached.
The problem can't be the
.msg
file because that exact file works fine with1.9.0
version, and1.10.0
version (except in this one thecompressedRtf
is broken). The issue happens only with versions1.11.0
and above.Since I'm not familiar with the codebase of this project, I just want to re-confirm that
001e
is really supposed to be out ofTYPE_MAPPING
here - 9c99db2#diff-df3542ef2be5d49cbfe3ab8237efe551439478c9dd3f8beec8337940efc39190R109 ?
You are right. It is clear that bug was introduced by miss placed. Sorry!
0x001E
is used for non-Unicode string.
0x001F
is for Unicode string.
[MS-OXCDATA]: Property Data Types | Microsoft Docs
FYI my test data files are exported from Outlook 2013.
I'm not sure why 0x001F
is selected: recent Outlook prefers Unicode string, or Asian version of Outlook prefers it.
Perfect, thank you so much! Everything works now!
After fixing issue https://github.com/HiraokaHyperTools/msgreader/issues/19 most of other parsed data broke:
1.9.0 (working correctly)
1.11 and 1.12 (broken)