hydroxide icon indicating copy to clipboard operation
hydroxide copied to clipboard

No emails shown in K9 on android

Open ghost opened this issue 4 years ago • 12 comments

I am running the bridge locally on my android device and I dont see emails showing up. It used to work a few days ago, but it stopped working now

Here is the log

* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR AUTH=PLAIN] IMAP4rev1 Service Ready
1 AUTHENTICATE PLAIN
+
2021/02/02 14:19:32 >> POST /api/auth/refresh
2021/02/02 14:19:32 {"RefreshToken":"8dc604b031lolveryfunjy","ResponseType":"token","GrantType":"refresh_token","RedirectURI":"http://www.protonmail.ch"}
2021/02/02 14:19:33 << POST /api/auth/refresh
2021/02/02 14:19:33 &protonmail.authResp{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, Auth:protonmail.Auth{ExpiresAt:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}, Scope:"full self payments keys parent user loggedin nondelinquent mail calendar", UID:"4f7e8888d11610bfab9d2c00c51ac881919eea3d", AccessToken:"2b446b2dabd4900c2dbaae055764sjwjjsjwjwj6c6", RefreshToken:"591411d3bf7635c2hsjsjshhs334dcff029cb", UserID:"", EventID:"", PasswordMode:0, TwoFactor:struct { Enabled int; U2F interface {}; TOTP int }{Enabled:0, U2F:interface {}(nil), TOTP:0}}, ExpiresIn:864000, TokenType:"Bearer", ServerProof:""}
2021/02/02 14:19:33 >> GET /api/addresses
2021/02/02 14:19:34 << GET /api/addresses
2021/02/02 14:19:34 &struct { protonmail.resp; Addresses []*protonmail.Address }{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, Addresses:[]*protonmail.Address{(*protonmail.Address)(0xb8202370), (*protonmail.Address)(0xb82023c0)}}
2021/02/02 14:19:35 >> GET /api/users
2021/02/02 14:19:35 << GET /api/users
2021/02/02 14:19:35 &struct { protonmail.resp; User *protonmail.User }{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, User:(*protonmail.User)(0xb8078370)}
2021/02/02 14:19:35 >> GET /api/addresses
2021/02/02 14:19:36 << GET /api/addresses
2021/02/02 14:19:36 &struct { protonmail.resp; Addresses []*protonmail.Address }{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, Addresses:[]*protonmail.Address{(*protonmail.Address)(0xb80a4140), (*protonmail.Address)(0xb80a4230)}}
2021/02/02 14:19:36 >> GET /api/labels
2021/02/02 14:19:36 << GET /api/labels
2021/02/02 14:19:36 &struct { protonmail.resp; Labels []*protonmail.Label }{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, Labels:[]*protonmail.Label{(*protonmail.Label)(0xb8480150), (*protonmail.Label)(0xb8480180)}}
2021/02/02 14:19:36 >> GET /api/messages/count
2021/02/02 14:19:36 << GET /api/messages/count
2021/02/02 14:19:36 &struct { protonmail.resp; Counts []*protonmail.MessageCount }{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, Counts:[]*protonmail.MessageCount{(*protonmail.MessageCount)(0xb849c7e0), (*protonmail.MessageCount)(0xb849c800), (*protonmail.MessageCount)(0xb849c810), (*protonmail.MessageCount)(0xb849c820), (*protonmail.MessageCount)(0xb849c840), (*protonmail.MessageCount)(0xb849c850), (*protonmail.MessageCount)(0xb849c870), (*protonmail.MessageCount)(0xb849c880), (*protonmail.MessageCount)(0xb849c890), (*protonmail.MessageCount)(0xb849c8b0), (*protonmail.MessageCount)(0xb849c8c0), (*protonmail.MessageCount)(0xb849c8d0), (*protonmail.MessageCount)(0xb849c8e0)}}
2021/02/02 14:19:36 User "astroanax" logged in via IMAP
1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR MOVE] AUTHENTICATE completed
2021/02/02 14:19:36 >> GET /api/events/latest
2 EXAMINE "INBOX"
* FLAGS (\Seen \Deleted \Flagged \Draft dev social)
* OK [PERMANENTFLAGS (\Seen \Deleted \Flagged \Draft dev social)] Flags permitted.
* OK [UIDVALIDITY 1] UIDs valid
* 6 EXISTS
* 0 RECENT
* OK [UIDNEXT 7] Predicted next UID
2 OK [READ-ONLY] EXAMINE completed
3 UID SEARCH 1:6 NOT DELETED
2021/02/02 14:19:36 Synchronizing mailbox INBOX...
2021/02/02 14:19:36 >> GET /api/messages
2021/02/02 14:19:36 << GET /api/events/latest
2021/02/02 14:19:36 &struct { protonmail.resp; *protonmail.Event }{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, Event:(*protonmail.Event)(0xb80a6540)}
2021/02/02 14:19:37 << GET /api/messages
2021/02/02 14:19:37 &struct { protonmail.resp; Total int; Messages []*protonmail.Message }{resp:protonmail.resp{Code:1000, RawAPIError:(*protonmail.RawAPIError)(nil)}, Total:6, Messages:[]*protonmail.Message{(*protonmail.Message)(0xb81100d0), (*protonmail.Message)(0xb8110270), (*protonmail.Message)(0xb8110340), (*protonmail.Message)(0xb8110410), (*protonmail.Message)(0xb81104e0), (*protonmail.Message)(0xb81105b0)}}
2021/02/02 14:19:37 Synchronizing mailbox INBOX: done.
3 NO search queries with NOT or OR clauses are not yet implemented
2021/02/02 14:20:06 >> GET /api/events/OO2My2ZlQlzdgMLVBfz4RtPNdzU_Ego9j1KJdROrBb-FNH6xmXBPQE2pprNRMOu-QL4c-EpKZKsq4DnfSDnOZw==
2021/02/02 14:20:07 << GET /api/events/OO2My2ZlQlzdgMLVBfz4RtPNdzU_Ego9j1KJdROrBb-FNH6xmXBPQE2pprNRMOu-QL4c-EpKZKsq4DnfSDnOZw==

The above log is the result when I try to refresh k9 by pressing the load 25 more emails button. I would like to point out that this doesnt work with other apps too, and that sending email isnt a problem, ony fetching it seems broken

ghost avatar Feb 02 '21 14:02 ghost

3 UID SEARCH 1:6 NOT DELETED
3 NO search queries with NOT or OR clauses are not yet implemented

Probably a K-9 Mail update. We probably could add support for this special case.

emersion avatar Feb 02 '21 14:02 emersion

It also didnt work under samsung email

ghost avatar Feb 03 '21 16:02 ghost

@emersion can you say if there is any progress on this?

melat0nin avatar Nov 27 '21 07:11 melat0nin

I'm not working on it.

emersion avatar Nov 27 '21 07:11 emersion

I would definitely love if this was fixed at some point. K-9 is so good and I love this bridge!

julianfairfax avatar Feb 06 '22 17:02 julianfairfax

I was playing around with the codebase, and I found a hacky solution. In fact, seems that official Protonmail bridge does not work for k9 either, and inspecting this repository that patches it to have support, I managed to implement to implement a fix in this fork

If that's ok, I can open a PR to the main repository

brennoflavio avatar Apr 06 '22 02:04 brennoflavio

I was playing around with the codebase, and I found a hacky solution. In fact, seems that official Protonmail bridge does not work for k9 either, and inspecting this repository that patches it to have support, I managed to implement to implement a fix in this fork

If that's ok, I can open a PR to the main repository

If you're using hydroxide through Termux, I have already fixed this issue in that package: https://github.com/termux/termux-packages/pull/9431

julianfairfax avatar Apr 06 '22 04:04 julianfairfax

This "fix" is incorrect. It completely ignores NOT clauses in search queries.

emersion avatar Apr 06 '22 06:04 emersion

This "fix" is incorrect. It completely ignores NOT clauses in search queries.

Mine, theirs, or both? Either way at least it works

julianfairfax avatar Apr 06 '22 10:04 julianfairfax

Well, both patches are exactly the same AFAIK.

at least it works

And it'll be terribly broken if the client does something else than NOT unimportant-criteria.

Please ask your users to not report any issues to this repository. I don't have time to provide support for copies of hydroxide with broken patches applied.

emersion avatar Apr 06 '22 10:04 emersion

I'll leave a note in my fork making clear that it is hacky and has no support, no worries

brennoflavio avatar Apr 06 '22 11:04 brennoflavio

Is the project just dead? Not working with android clients is a bit of a bummer

Nicknakin avatar Feb 14 '24 03:02 Nicknakin