element-hq / hydrogen-web

Lightweight matrix client with legacy and mobile browser support
Apache License 2.0
646 stars 124 forks source link

KaiOS Support #368

Open hanthor opened 3 years ago

hanthor commented 3 years ago

I just tried it, I got an error on logging in. It tried to export and import my session but I'm not sure that the browser supports uploading json

bwindels commented 3 years ago

I'd love to get my hands on the error log if you find a way. KaiOS is something I'd personally really like to see as well, even though I don't have a device. We don't have a reason to allocate resources to at this point though, but knowing what errors do pop up would be a good start.

Perhaps if you connect your phone over USB, you have a way to access the browser devtools or the file system if you manage to save the log file? In any case, if you need to export the debug logs from the console, you can do, which should give you a big json string:

__hydrogenViewModel.logger.export().then(export => export.asBlob()).readAsBuffer().then(buffer => new TextDecoder().decode(buffer)
hanthor commented 3 years ago
12:32:10.678 no persisted storage, database can be evicted by browser 1 hydrogen-legacy-3544299089.js:19283:22
12:32:10.934 session load error TypeError: this.sendAll(...).then(...).finally is not a function
Stack trace:
init@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:28149:8
_callee5$@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:29141:21
tryCatch@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:10200:38
invoke@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:10430:23
defineIteratorMethods/</<@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:10255:17
asyncGeneratorStep@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8298:17
_next@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8320:10
_asyncToGenerator/</<@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8327:8
_asyncToGenerator/<@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8316:13
_loadOlmWorker@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:29162:11
_loadOlmWorker2@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:29127:11
_callee$@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:29277:25
tryCatch@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:10200:38
invoke@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:10430:23
defineIteratorMethods/</<@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:10255:17
asyncGeneratorStep@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8298:17
_next@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8320:10
_asyncToGenerator/</<@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8327:8
_asyncToGenerator/<@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8316:13
loadOlmWorker@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:29291:17
_callee$@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:59334:30
tryCatch@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:10200:38
invoke@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:10430:23
defineIteratorMethods/</<@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:10255:17
asyncGeneratorStep@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8298:17
_next@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8320:10
_asyncToGenerator/</<@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8327:8
_asyncToGenerator/<@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8316:13
_main@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:59369:11
main@https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:59307:11
@https://hydrogen.matrix.domain/#/login:24:1
 1 hydrogen-legacy-3544299089.js:58287:20
    _callee$ https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:58287:20
    tryCatch https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:10200:38
    invoke https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:10430:23
    defineIteratorMethods/</< https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:10255:17
    asyncGeneratorStep https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8298:17
    _next https://hydrogen.matrix.domain/hydrogen-legacy-3544299089.js:8320:10
hanthor commented 3 years ago

Probably wait for kaios 2.0 which uses a newer version of firefox as it's base

hanthor commented 3 years ago

KaiOS 3.0 will be based on a newer version of Firefox. so it will likely work. Tried to test on the KaiOS 3.0 Simulator but couldn't scroll down :(

bwindels commented 3 years ago

Interesting, could you make a screen recording of the behaviour? I think the error you're seeing on kaios 2.x is mostly due to #230

AnisTaluqdar commented 2 years ago

Kaios 3 is based on the Mozilla Gecko engine (version 84). I wish hydrogen app will be in the kaios store.

bwindels commented 2 years ago

Oh, interesting Kai OS 3.0 is out based on FF 84. I hear you about being in the store, but it's hard to find time for this. Any help would be appreciated.