-
-
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
Unable to store blob type attachments in Electron #3022
Comments
Can you extend this test to reproduce the error? |
electron test |
Can confirm that this is true. What was the reason to use |
I don’t think there’s any downside in removing L55-L60: rxdb/src/plugins/attachments.ts Lines 55 to 60 in 86967dc
Correct me if I’m wrong. |
I am not sure why I had to add this. |
Ah I've noticed that the electron tests are currently commented out |
I tried to delete this code and then the render process gone. Maybe because this or that |
I fixed the electron tests in the CI. |
|
|
I had to disable the electron tests from the CI again. They still randomly fail. |
I reproduced this error here, the test code is in |
That helps a bit. But I need a PR with a reproduction in the CI, I spend too much time in the past to debug other peoples setup. |
@kuka we also have tests that run inside of electron https://github.com/pubkey/rxdb/tree/master/examples/electron/test |
Same issue here. Electron 11.4, renderer process, IndexedDB adapter. Is there a current workaround or ideas for something to try? |
I am not sure what is happening here. Everyone has the same problem but noone wants to even update the electron example. |
@pubkey played with the electron test and it worked for me. I ran it many times and minor delay for async worked. |
Updated the PR with the Electron error reproduction and some improvements for the example #3098. |
I'm not sure what the process is but I'm ready to help with whatever. #3098 is a good repro for my use too. |
@ash0x0 I don’t believe there is any process. Just introducing a PR with a fix in it is 90% of the task. No permission needed. Btw, I tested out omitting blob handler in here Lines 419 to 424 in 7bbc78c
@pubkey thank you for all the work you did/do! |
|
fixes electron spectron test spec, #3022;
@ash0x0 I simply reproduced the error we’re all experiencing in electron test. The changes include improvements for the example as well. Now we have to fix the error itself. It’s unclear what the source of the issue is it seems. You could do what @pubkey laid out and then try to find out what the root of the issue is. Items are:
Basically overarching goal is to make sure Electron test works as expected so that we can clearly see it’s initially failing and passing once the fix is introduced @ash0x0 . I’ll be able to dig deeper sometime this/next week as well. |
Ok I'll get on 3 and 4 until you guys figure out the CI issue. |
It is very likely that updating the deps will fix the ci problems |
Closing this since it seems noone wants to work on it. Ping me when you want to work on that so I can reopen. |
@pubkey I am working on it, just not fixed. I did the version update, added #3098 and tested, the CI works on my fork, the issue is there and attachment fails so that's where I'm at. It's definitely src/util.ts#L408 and there are variations with electron and node version for buffer handling. |
Oh sorry. I reopened it. |
There is a good chance that this is solved in the new RxDB major version. Please test. |
Closing this, likely fixed in 10.0.0. |
On Simple code like
throw this error: If i pass
It happens, because UPD: I fix this behaviour with
in schema. Seems problem appears after encryption, without encryption all works fine. But works only with blob, not string.
|
Hello, |
:) |
Must've missed that, apologies. |
Case
bug
Issue
I've got an error when trying to store an attachment in electron renderer process, with pouchdb adapter.
Throws:
Versions
Info
Code
After I see the source code, problem in this method,
Buffer.from
can't accept a Blob parameter.And it is impossible to encrypt the blob type attachments,
JSON.stringify
also can't accept a Blob parameter.The text was updated successfully, but these errors were encountered: