Open teleothleo opened 5 months ago
You can comment the last line in build-tdlib.sh
to disable asmjs
building.
You can comment the last line in
build-tdlib.sh
to disableasmjs
building.
build-tdlib.sh
went well! Now there are some errors during build-tdweb.sh
though.
...
Run `npm audit` for details.
> tdweb@1.8.1 build
> webpack --mode production
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Hash: 01879bcdd631b5b1f5e1
Version: webpack 4.44.1
Time: 2685ms
Built at: 03/22/2024 12:03:06 PM
4 assets
Entrypoint main = tdweb.js
[7] ./src/worker.js 113 bytes {0} [not cacheable] [built]
[9] multi ./src/index.js 28 bytes {0} [built]
[14] ../../src/methods/node.js (ignored) 15 bytes {0} [built]
[17] ./src/index.js + 9 modules 56.6 KiB {0} [built]
| ./src/index.js 31.6 KiB [built]
| ./src/logger.js 1.87 KiB [built]
| + 8 hidden modules
+ 14 hidden modules
Child worker:
3 assets
Entrypoint main = 531569a634d32bdb7d27.worker.js
[6] ./src/prebuilt/release/td_wasm.wasm 83 bytes {0} [built]
[7] (webpack)/buildin/global.js 472 bytes {0} [built]
[9] ./node_modules/babel-loader/lib!./node_modules/eslint-loader!./src/worker.js + 2 modules 70.1 KiB {0} [built]
| ./node_modules/babel-loader/lib!./node_modules/eslint-loader!./src/worker.js 61.1 KiB [built]
| ./src/logger.js 1.87 KiB [built]
| ./src/wasm-utils.js 7.08 KiB [built]
[17] ./src/prebuilt/release/td_wasm.js 134 KiB {1} [built]
+ 14 hidden modules
ERROR in ./src/worker.js (./node_modules/babel-loader/lib!./node_modules/eslint-loader!./src/worker.js)
Module not found: Error: Can't resolve './prebuilt/release/td_asmjs.js' in '/home/etevve/0base/field/libs/td/example/web/tdweb/src'
@ ./src/worker.js (./node_modules/babel-loader/lib!./node_modules/eslint-loader!./src/worker.js) 336:19-59
ERROR in ./src/worker.js (./node_modules/babel-loader/lib!./node_modules/eslint-loader!./src/worker.js)
Module not found: Error: Can't resolve './prebuilt/release/td_asmjs.js.mem' in '/home/etevve/0base/field/libs/td/example/web/tdweb/src'
@ ./src/worker.js (./node_modules/babel-loader/lib!./node_modules/eslint-loader!./src/worker.js) 10:0-70 342:21-41
You need to remove mentions of asmjs
from tdweb/src/worker.js.
Yep, it worked! Thank you for your work and help!
Right now I am facing errors coming from TDLib that I've not seen before. I've cleaned the cache after the rebuid & upgrade.
the first error:
1.d3f734d351e5f398dac9.worker.js:2585 [ 0][t 0][1711119125.622000217][Binlog.cpp:332][!Binlog /Glider/dbfs/td.binlog] Failed to validate binlog event [Error : 0 : CRC mismatch [actual:0x7144f2a1][expected:0xcd89428c]LogEvent[[id:0x00000000000000a8][type:17191][flags:0][data:176584]][/home/etevve/0base/field/libs/td/tddb/td/db/binlog/Binlog.cpp:141]]
0002b1e8 000000a8 00000000 00004327 00000000 00000000 00000000
at http://127.0.0.1:5173/6eb463deb9a15ec0e9b91524cb388c8f.wasm:wasm-function[31997]:0x748892
at http://127.0.0.1:5173/6eb463deb9a15ec0e9b91524cb388c8f.wasm:wasm-function[17171]:0x41a3bb
at http://127.0.0.1:5173/6eb463deb9a15ec0e9b91524cb388c8f.wasm:wasm-function[72]:0x24e7f
at http://127.0.0.1:5173/6eb463deb9a15ec0e9b91524cb388c8f.wasm:wasm-function[7712]:0x21aa5f
at http://127.0.0.1:5173/6eb463deb9a15ec0e9b91524cb388c8f.wasm:wasm-function[10278]:0x2a62ad
at http://127.0.0.1:5173/6eb463deb9a15ec0e9b91524cb388c8f.wasm:wasm-function[10905]:0x2bfa1e
_emscripten_log_js @ 1.d3f734d351e5f398dac9.worker.js:2585
_emscripten_log @ 1.d3f734d351e5f398dac9.worker.js:2585
$func31997 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x748892
$func17171 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x41a3bb
$func72 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x24e7f
$func7712 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x21aa5f
$func10278 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x2a62ad
$func10905 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x2bfa1e
$func17347 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x4222a2
$func17355 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x422b39
$func32077 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x74af62
$func26496 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x5c5230
$func558 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x2c6fc
$func42307 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x82ec4e
$func5836 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x1ae009
$func19514 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x47d462
$func42271 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x82dafd
$func125 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x261da
$func695 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x2e61d
$func5332 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x11c48e
$func32050 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x749eaa
$func21469 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x4d20b5
$func11114 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x2c3f61
$func17958 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x43b2e1
$func20521 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x4b1c41
$oa @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x83efc4
ccall @ 1.d3f734d351e5f398dac9.worker.js:2585
(anonymous) @ 1.d3f734d351e5f398dac9.worker.js:2585
receive @ d3f734d351e5f398dac9.worker.js:5836
(anonymous) @ d3f734d351e5f398dac9.worker.js:5897
setTimeout (async)
scheduleReceiveIn @ d3f734d351e5f398dac9.worker.js:5896
scheduleReceive @ d3f734d351e5f398dac9.worker.js:5887
receive @ d3f734d351e5f398dac9.worker.js:5852
(anonymous) @ d3f734d351e5f398dac9.worker.js:5897
setTimeout (async)
scheduleReceiveIn @ d3f734d351e5f398dac9.worker.js:5896
scheduleReceiveSoon @ d3f734d351e5f398dac9.worker.js:5876
(anonymous) @ d3f734d351e5f398dac9.worker.js:5580
Module.websocket.emit @ 1.d3f734d351e5f398dac9.worker.js:2585
handleMessage @ 1.d3f734d351e5f398dac9.worker.js:2585
peer_socket_onmessage @ 1.d3f734d351e5f398dac9.worker.js:2585
and the second error:
1.d3f734d351e5f398dac9.worker.js:2585 [ 0][t 0][1711120477.958000183][FileManager.cpp:697][!GetChatRequest] Check `Unreachable` failed
at http://127.0.0.1:5173/6eb463deb9a15ec0e9b91524cb388c8f.wasm:wasm-function[31997]:0x748892
at http://127.0.0.1:5173/6eb463deb9a15ec0e9b91524cb388c8f.wasm:wasm-function[17171]:0x41a3bb
at http://127.0.0.1:5173/6eb463deb9a15ec0e9b91524cb388c8f.wasm:wasm-function[72]:0x24e7f
at http://127.0.0.1:5173/6eb463deb9a15ec0e9b91524cb388c8f.wasm:wasm-function[65]:0x24c88
at http://127.0.0.1:5173/6eb463deb9a15ec0e9b91524cb388c8f.wasm:wasm-function[9335]:0x27051c
at http://127.0.0.1:5173/6eb463deb9a15ec0e9b91524cb388c8f.wasm:wasm-function[1274]:0x3aa48
Also this warning appears quite often:
1.d3f734d351e5f398dac9.worker.js:2585 __syscall_getsockname 9
___syscall_getsockname @ 1.d3f734d351e5f398dac9.worker.js:2585
$func4475 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0xe13b9
$func30822 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x6baf1e
$func46066 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x8fea29
$func25289 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x58fa8f
$func4817 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0xfd098
$func46164 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x90314e
$func7341 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x1fd854
$func11114 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x2c3f61
$func17958 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x43b2e1
$func20521 @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x4b1c41
$oa @ 6eb463deb9a15ec0e9b91524cb388c8f.wasm:0x83efc4
ccall @ 1.d3f734d351e5f398dac9.worker.js:2585
(anonymous) @ 1.d3f734d351e5f398dac9.worker.js:2585
receive @ d3f734d351e5f398dac9.worker.js:5836
(anonymous) @ d3f734d351e5f398dac9.worker.js:5897
setTimeout (async)
scheduleReceiveIn @ d3f734d351e5f398dac9.worker.js:5896
scheduleReceiveSoon @ d3f734d351e5f398dac9.worker.js:5876
(anonymous) @ d3f734d351e5f398dac9.worker.js:5580
Module.websocket.emit @ 1.d3f734d351e5f398dac9.worker.js:2585
handleMessage @ 1.d3f734d351e5f398dac9.worker.js:2585
peer_socket_onmessage @ 1.d3f734d351e5f398dac9.worker.js:2585
Something is very wrong, First two crashes looks like memory corruption.
Hello! I face this error while running
build-tdlib.sh
script. I source emsdk (source "/usr/lib/emsdk/emsdk_env.sh"
) and I runemsdk activate 3.1.1
before executing all the commands provided here. Please tell me how to avoid that error. Also, if there is such an option, please explain what should I do to build only wasm version suitable for React projects to avoid error while building asmjs one.logs:
Also, when I run
emcc --version
, the version seems correct: