yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] M66B:
I have just looked at this crash log of version 1.222 built by F-Droid:

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkCapabilities.hasCapability(int)' on a null object reference
at eu.faircode.email.ServiceSynchronize$ServiceManager.onCapabilitiesChanged(SourceFile:2286)
at android.net.ConnectivityManager$CallbackHandler.handleMessage(ConnectivityManager.java:2878)

However, there is no onCapabilitiesChanged on line 2286 in the original source code of version 1.222:

https://github.com/M66B/open-source.../faircode/email/ServiceSynchronize.java#L2286

Also not in the source tarball referenced by F-Droid:

https://f-droid.org/repo/eu.faircode.email_222_src.tar.gz

It looks like the F-Droid version is not built from the original source code. I don't know why, but the facts don't lie. Hopefully F-Droid isn't hacked or something.
[Android Apps and Games] fitittome:
I think you just need more coffee. lol. There's always an explanation and it's nearly always a ****-up etc.
[Android Apps and Games] M66B:
Hopefully, there is a good explanation, but this is not good because F-Droid promises to build from the original source code.

Anyway, it is not me who needs more coffee, but someone from F-Droid needs to look into this.
[Android Apps and Games] fitittome:
I know little on this. But could these onCapabilitiesChanged type events be intercepted by hacky things like Xposed etc. Just a thought....
[Android Apps and Games] M66B:
That wouldn't change the line number.
[Android Apps and Games] fitittome:
Solved it! It's not your package, it's that rip-off version on F-Droid.
[Android Apps and Games] M66B:
No, it isn't.
[Android Apps and Games] M66B:
I have just released

stable

version 1.227

Changelog/download:

https://github.com/M66B/open-source-email/releases

This version will be available in the Play store after Google's approval.

You are advised to upgrade to this version because I fixed an edge case on handling connectivity changes which can result in synchronization left disabled until the next connectivity change. This can happen when the device connected to a network and very soon thereafter disconnects from this network.
[Android Apps and Games] fitittome:
Oh, OK. their 115 version ServiceSyncronize is in that ball park. Sorry, just trying to help. You can deleted all this noise, cluttering up your sub, if you want.....
[Android Apps and Games] GeoffreyFrogeye:
Hi, I'm the user that got the crash. Just to make sure, the version I have in `/data/app/eu.faircode.mail-XXXXX/base.apk` is the same as the version 1.222 that can be downloaded from F-Droid (MD5: 0c1b09df172f1093662821c46a8e66b1, and signature matches verified by 7A029E54DD5DCE7A). If it does make a difference, I am using the ROM CARBON-CR-6.1-NOCT-RELEASE-z3-20180911-0821.zip, I do not have the Play Services enabled but I do have microG installed (so I do have signature spoofing enabled), and I also have Magisk v18.0.
[Android Apps and Games] M66B:
The Android version and if the Play services are installed do not matter.

For some for now unexplained reason the line numbers in the crash log do not match the source code. Hopefully, this is an error, like having built from old source code, and not something more serious.
[Android Apps and Games] GeoffreyFrogeye:
In any case if someone thinks the problem is due to my setup I'm here to answer.

Just note that the number of the original source code for this line is higher than the one in the crash log. So it probably means removed code. I've tried removing the comments and/or the empty lines to try to match that number, but no result.
[Android Apps and Games] Licaon_Kter:
That's the whole error? Maybe paste it all.
[Android Apps and Games] BubuIIC:
Where can I download your build of the 1.222 release do compare that to what F-Droid built?
[Android Apps and Games] M66B:
See here: https://xdaforums.com/showpost.php?p=78460710&postcount=3561
[Android Apps and Games] M66B:
I have made the original built version 1.222 temporarily available here:

https://github.com/M66B/open-source-email/releases/tag/1.222

Since I only support the latest version, I mostly remove old versions after releasing a new version.
[Android Apps and Games] Licaon_Kter:
3 lines? That is all? Mmmkay
[Android Apps and Games] M66B:
For the case at hand that doesn't matter, but if you insist, this is the complete crash log:

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkCapabilities.hasCapability(int)' on a null object reference
at eu.faircode.email.ServiceSynchronize$ServiceManager.onCapabilitiesChanged(SourceFile:2286)
at android.net.ConnectivityManager$CallbackHandler.handleMessage(ConnectivityManager.java:2878)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)

Does it add something? Not at all.
[Android Apps and Games] Licaon_Kter:
How did this playout? Something happened....the app crashed...you've restarted...then you immediately send a crash log email?

Going through past F-Droid releases I could see this error happen in 1.191 and somehow FairEmail picking the "old" stack trace from logcat.
[Android Apps and Games] M66B:
This is the complete crash log message, but redacted for privacy reasons:

FairEmail: eu.faircode.email/org.fdroid.fdroid.privileged 1.222/3
Android: 8.1.0 (SDK 27)

Brand: redacted
Manufacturer: redacted
Model: redacted
Product: redacted
Device: redacted
Host: redacted
Display: redacted
Id: redacted

Battery optimizations: true
Data saving: true

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkCapabilities.hasCapability(int)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkCapabilities.hasCapability(int)' on a null object reference
at eu.faircode.email.ServiceSynchronize$ServiceManager.onCapabilitiesChanged(SourceFile:2286)
at android.net.ConnectivityManager$CallbackHandler.handleMessage(ConnectivityManager.java:2878)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)

As you can see the version number is 1.222 and the installer is F-Droid.
[Android Apps and Games] ouzowtf:
Could the selection of emails and the specific sub menu actions (except 'move') in the shared inbox be made working across different accounts?

I understand that the delete, archive and spam actions are basically just a move to a directory too, but there is a known folder for every account.

And the unread and favorite actions could be processed grouped by account too. At least in my imagination.

Currently it's bit hard to understand for users that sometimes the selection of additional mails does not work, even if they realize the reason for this behavior (every time anew) after a few seconds.

Another thing I want to raise again as a topic is an optional swipe down to refresh, because I'm pretty confident that the swipe to delete/archive is a lot more usable when this is turned off and both gestures doesn't fight against each other to win :laugh:
[Android Apps and Games] M66B:
Moving across IMAP servers is not a good idea as this can result in lost and duplicate messages.

Edit: also, not every account might have an archive folder, etc, which would make things not only complicated, but also confusing to use.

Edit: I am not planning to add an option for pull down to refresh. If swipes and pull downs interact with each other, this is a problem of your Android version or maybe you need to be more precise with the movements.
[Android Apps and Games] Licaon_Kter:
This does not invalidate my comment, ("somehow FairEmail 1.222 picking the "old" stack trace from logcat"), since actual stack traces are not versioned in any way (unless you've deleted the date/time from the logs, and those were after 1.222 was released on F-Droid, 2018-12-17).

Having said that, ignoring 1.222, does that stacktrace make sense in 1.191?
[Android Apps and Games] M66B:
This would make sense only if FairEmail was not used for quite some time, which is possible, but not likely.

I am not going to look back old source code because this problem is known to be fixed.
[Android Apps and Games] Licaon_Kter:
The "use" is not the issue but the "update" might be, 1.191 was published on 2018-12-01, and F-Droid has issues with autoupdates on my devices too.
[Android Apps and Games] M66B:
'Use' does matter. FairEmail writes the crash log to a file directly after it occurred, but generates a crash log message after opening FairEmail again. This is to prevent the crash from crashing again.

Edit: also, the crash log is not based on the logcat
[Android Apps and Games] BreckZeBoulay:
[MENTION=2932933]ouzowtf[/MENTION] : you and me are to old for this app :laugh:
[Android Apps and Games] ouzowtf:
Yeah, mid 30 is old nowadays :silly::highfive:
[Android Apps and Games] M66B:
Did you know I am 50+ ?
[Android Apps and Games] ouzowtf:
Nope :D
[Android Apps and Games] GeoffreyFrogeye:
To follow-up with the code line mismatch on the crash report problem, I've asked the question on the F-Droid Matrix room (see logs) .

tl;dr: The issue is weird indeed but apparently nothing to worry about and the issue is now tracked.

In other news I am unable to reproduce the bug even if I didn't update. Good news I guess?
[Android Apps and Games] M66B:
Did you recently update?

Did you use FairEmail not for some time?
[Android Apps and Games] GeoffreyFrogeye:
According to the filesystem, FairEmail was updated on 2018-12-18 15:32 GMT+01:00 and I sent the crash report 22:44:53, a few moments after I received the mail which triggered the crash when clicking on the notification. I received no mail in between.

And yeah, I did not really use my phone for a week or so.
[Android Apps and Games] M66B:
Then it is likely that you sent a crash report from using the previous version.

This also explains why it is fixed now.

Case closed.
[Android Apps and Games] GeoffreyFrogeye:
Isn't the upgrade supposed to restart the app though? I think that's what happened, since I did not receive notification for any mail in this week. While this one got through all of a sudden.

Also the line `onCapabilitiesChanged` has never been on line 2286, I checked that with the git history so...

But yeah, you're right, I guess a single crash report for an unreproducible bug is not worth exploring more than that...
[Android Apps and Games] M66B:
Fortunately, a restart does not erase the crash log ...
[Android Apps and Games] dorqus:
Running latest GitHub version, seeing this error. Tried clearing local messages and resyncing, but error persists. "Showing Original" just shows a white screen with the same error message - com.sun.mail.util.QPDecoderStream@baeba92. Viewing the email in Mail.app looks fine, same with GMail Web
[Android Apps and Games] M66B:
This is probably caused by errors in the message encoding, which I like to check because it doesn't happen too often.

Please clear local messages again and synchronize again. Open the message to cause the error again and send me the debug info soon thereafter by long pressing 'Support'.

Also, if sharing of the message isn't a problem, download the message headers (via 'More') and forward the raw message to me (same 'More' menu). You can use the same email address as of the debug info.
[Android Apps and Games] dorqus:
Done and done. Please don't cancel my appointment at the Apple store however :)

Thanks..
[Android Apps and Games] M66B:
Thanks. I will look into this tomorrow.

No worries, your data is safe with me. I will delete everything after inspection.
[Android Apps and Games] steakhutzeee:
Opening the spam folder of one of my two Gmail accounts I see this every time. Using latest version.
[Android Apps and Games] M66B:
Please reproduce the problem and send me soon thereafter the debug info (long press 'Support').
[Android Apps and Games] la_poigne:
I have a question about folder.

I removed some folder on my imap webmail, they doesn't exist anymore on server. But I see them in the app.

How can I refresh the folder list ?
[Android Apps and Games] steakhutzeee:
Done.
[Android Apps and Games] netguarduser:
My first post here.

I recently became a premium user and I tried to send an email with an alias and it didn't work. My question is not why it didn't but the notification about it: I tried all I could to delete the trace of this message, synchronizing manually, etc... but in the notification of my Android 9 remains this message (it's in Spanish language, so I tried to translate it to English): "Synchronizing an account. 1 message not sent".

Do you know how to stop this message?. I even tried rebooting my smartphone.

Thanks!
[Android Apps and Games] M66B:
Thanks. I will look into this later today.
[Android Apps and Games] M66B:
The message should be in the outbox. You should be able to open it and delete it if there is an error.
[Android Apps and Games] netguarduser:
It isn't. As I said, in the FairEmail app the outbox and Sent folders are empty (Trash too), and I also checked in the server of my email provider (Fastmail). I don't know why this notification still persists and I don't know how to tell the app that there's nothing pending. I don't want to avoid notifications, I only want the app knows that it's an error.

---------- Post added at 11:22 AM ---------- Previous post was at 11:10 AM ----------

I tried again adding the previous alias and trying to send another email. It doesn'work and now I remember that the last time I deleted the message from the Outbox because it was not sent (I'll do it again now). So, the message not sent from an alias was in theh Outbox folder, I deleted it, and the notification will always be there not knowing I deleted the message. I think it will happen again now. Do you know what can I do in this case?

Thanks again.

---------- Post added at 11:26 AM ---------- Previous post was at 11:22 AM ----------

Can it be because I don't use exactly the domain "fastmail.com" in my email but another one from Fastmail (they offer you many other domains to choose, but they all use the same imap and smtp engine).
[Android Apps and Games] M66B:
The alias should matter. I will later today try to reproduce this.
[Android Apps and Games] netguarduser:
Marcel: I think Fastmail is the problem. When you want to use another app you must create an "app password" and it works receiving email with FairEmail but not sending emails (smtp) with this app. If I remember well it always worked before (K9, etc) but I must check it. With FairEmail I can't send emails, even with my main account in Fastmail. Or maybe it's a Fastmail problem in these moments. I'll try to find out what happens and I'll let you know.

Thanks for your support.
[Android Apps and Games] M66B:
Please see the FAQ about aliases, maybe it helps. Crucial is what you use as email address and what as username. The email address will be the alias in most cases and the username the main email address. This depends on the provider.
[Android Apps and Games] netguarduser:
Marcel: it doesn't work even with my main account (wiithout aliases). It's a smtp problem with your app and Fastmail. I just tested K9 even with aliases and it always work. So?...

Maybe I'm doing it wrong with FairEmail.

Question: if I need to send emails I suppose I must add an identity, even my main identity. Is that right or it's not necessary?. If I'm right then it's a FairEmail problem with Fastmail and smtp, I don't know what...

Thanks again.

---------- Post added at 12:25 PM ---------- Previous post was at 12:21 PM ----------

Maybe in your app some things are "supposed" (ssl/tls, needs to signin, etc) and that why it fails.

Have you seen these settings in other email providers?:

https://www.fastmail.com/help/clients/android.html

Maybe it could help to work with FairEmail.
[Android Apps and Games] M66B:
I don't think it isn't a Fastmail or FairEmail problem, but a configuration problem. You'll need to find the right username / password, etc. Maybe someone else here can help you?
[Android Apps and Games] netguarduser:
I'm an advanced user Marcel and I've tested a lot of different apps, programs, operative systems (Mac, Windows, BSD,s, GNU/Liinux, IOS and Android), username/passwords, protocols, etc... and the only problem is with FairEmail. I've tested K9 and it works perfectly with the same confniguration. It must be something else that FairEmail don't ask in the configuration (so, we can't say yes or no).

But I'll continue testing what could happpen.

Thanks for your time and effort Marcel.
[Android Apps and Games] M66B:
Maybe this?

"Android apps needs their own app password to access your information. If you use your normal password or your FastMail to step verification password on an external account, syncing to an external service won't work and you will see a password error."
[Android Apps and Games] netguarduser:
No, I know about it and I used that app password in FairEmail (even I created 3 to test and nothing). It works to receive email with FairEmail, but not to send it. And I've tested it a lot of times, even being sure that it was the right password. With K9 no problem with the app password to receive and send emails. As I said, I've tested a lot and with FairEmail I can't send emails with the app password, only receiving emails.

Maybe it could be something like ssl/tls, needing to signin or who knows... that's why I sent you the link.

So, I moved to K9 again after you solve this problem.

Thanks!
[Android Apps and Games] M66B:
I am pretty sure this is not a FairEmail problem, although you'll never know. Maybe another Fastmail user can help.
[Android Apps and Games] netguarduser:
If I use the same configuration in FairEmail and K9 and in FairEmail doesn't work, then it's normal to think that it's a FairEmail problem or something missing in the app that it's necessary with Fastmail to work sending emails. And more if I've tested it a lot. if not you'll tell me... that's what I think. I can't find another explanation. And I talk about using the MAIN account to send emails, not even aliases.

I see that FairEmail doesn't ask some things to make things simpler, it's ok but maybe some companies need to know those things to work well.

But maybe someone can help: Is anyone using Fastmail to send emails with FairEmail here?.

Thanks anyway Marcel.
[Android Apps and Games] M66B:
I have just created a trial Fastmail account and configured FairEmail using the default Fastmail profile using an app password for Android / Mail (IMAP, POP, SMTP) and I can send and receive messages without any problem. So, please double check your configuration and make sure you are using the right credentials and app password (type).
[Android Apps and Games] netguarduser:
I don`t know why but now it´s working!.

Maybe it was an issue with the domain I use (sent.com) instead of fastmail.com from Fastmail servers. I can´t explain it. I hope it continues this way. If not I´ll let you know.

Note that I tried 4 times before without success.

I appreciatte all the effort you put in it.

Thanks a lot!

---------- Post added at 06:33 PM ---------- Previous post was at 06:19 PM ----------

Again the same problem. It worked before and trying again now... and it´s not a network issue because I can browse the internet fast and all the other things, and the firewall (Netguard) is disconnected.

Well, I don´t mind I supported your work, you deserve it, but I won´t use this app with this problem in my phone.

Thanks anyway.
[Android Apps and Games] M66B:
If it works one time and another time not, it is most likely not a FairEmail problem.
[Android Apps and Games] netguarduser:
Not happening this issue with K9 ever (not even 1 time). That´s what I mean. You can think that it´s not a FairEmail problem and it´s ok. Maybe it´s something in my smartphone with the code of the app, who knows... It doesn´t matter. The app is great but it´s not working well in my phone.

Thanks Marcel.
[Android Apps and Games] fitittome:
FWIW I have just set-up and trial account, configured it all correctly and it works fine. Good job! :good:
[Android Apps and Games] netguarduser:
One last test: can you try, after some time, from time to time, to send another email and tell me if it works well and fast?. It´s to know if the issue is about the synchronization. If it works sending many emails in different minutes then it´s my android 9 phone.

Thanks again.
[Android Apps and Games] M66B:
The Android version doesn't matter much.

Aren't you simply hitting the send limit?

https://www.fastmail.com/help/account/limits.html

FairEmail is conservative in retrying to send to prevent servers from locking you out.
[Android Apps and Games] netguarduser:
No, I already thought about it and my limit is very high: standard account. And it happened to me the first time I tried the app today.

Maybe it´s because I see too much time in the folder the message without being sent and like you say it can takes more time, if I understand it well as "conservative". But sometimes it was 1 hour with the notification that 1 or 2 message not sent. So, I think it could be something else.

The first time I sent 1 email was when I disabled the sync and then enabled it again. But after some time, trying to send another email failed again. Then I deleted the entire account and tried again, and 3 times more, with different app passwords, and nothing, except when you posted some minutes ago. But after some minutes failed again. So, I´m lost here Marcel.

Please don´t think I´m joking or I´m a troll, you know that I sent you the donation this morning and I am serious about this problem. I love the app but some problem happens with it in my phone.

No problem Marcel, seriously. I don´t want to waste more of your time because it could be an exception. Maybe android Pie with my configuration, or who knows. Forget it and thanks for your help.
[Android Apps and Games] M66B:
I take this issue serious because others might experience or going to experience similar problems. Please send me the debug info by long pressing 'Support'. Maybe that reveals something.
[Android Apps and Games] netguarduser:
This is like a X-File... now it´s working again.

When it fails I will send you the debug info.

Thanks
[Android Apps and Games] steakhutzeee:
[MENTION=2799345]M66B[/MENTION],

I noted that our conversation in Fairemail is marked by a different 'Re:' for every message in it.

Now I'm used to see it only one time, instead here I see it for every time a new message is sent. This way it's difficult to read the object of the email. The object can change for every message in the same conversation? Maybe this is the cause. I'll attach a screen.

An idea, when in trash folder, selecting messages, the 'trash' option is aviable. At least in Italian. Maybe in that occasion, the option can change in something more specific because it's the act to delete for good?

Another thing, maybe could be useful a 'Restore' option when selecting something in the trash. Of course there is the move option, but this way it's easier. It's one tap instead of two, nothing important. Just typing ideas as they come to my mind :p
[Android Apps and Games] netguarduser:
Good news Marcel: until now it´s working great, even with Netguard. Hoping to "stay" that way. I´ll check it some days more and I´ll let you know. Thanks!
[Android Apps and Games] M66B:
Adding a new 'Re:' on each reply is a convention. If you don't like it, you can always edit the subject.

The next version will show 'trash' or 'delete' appropriately.

Moving out of trash is not a common operation, so IMHO it is not a good idea to add a special function for this, also because it isn't clear where the message should go.
[Android Apps and Games] M66B:
I have just released

stable

version 1.228

Changelog/download:

https://github.com/M66B/open-source-email/releases

This is mainly a bug fix release, although there are some minor visible changes.

I switched to the Android Studio Crowdin plugin to synchronize translations, so please let me know if the translations are still alright.

Thanks, donations and purchases are appreciated.