notes icon indicating copy to clipboard operation
notes copied to clipboard

Bug related to reported Wifi spikes - Make sure not to ship the bearer plugin on Windows

Open nuttyartist opened this issue 4 years ago • 6 comments

Someone emailed us today about a bug related to Wifi Spikes. This might be an upstream problem. Here's the email:

Hi guys!

First of, thanks for the Notes. Really cool app which I've been using for years. However a very interesting bug-case recently happened.

I bought a new HP laptop, installed Windows 10 64-bit (1909), Drivers etc. and then Notes of course. After some time I noticed that my WiFi was lagging. It became annoying, so I started to dig into issue, spent a couple of days and finally found this -- a consistent (regular) WiFi spikes from low to huge. Interesting that if Notes are completely off, then no spikes. If Notes are open then I see this:

Ответ от 192.168.0.1: число байт=32 время=3мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=1807мс TTL=63   <--------------
Ответ от 192.168.0.1: число байт=32 время=5мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=5мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=4мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=3мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=5мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=4мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=6мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=18мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=1934мс TTL=63   <--------------
Ответ от 192.168.0.1: число байт=32 время=4мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=5мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=4мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=5мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=5мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=4мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=5мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=11мс TTL=63
Ответ от 192.168.0.1: число байт=32 время=1887мс TTL=63  <--------------
.....


I am 100% sure that it was related to Notes because I checked every other app separately. I was so desperate that even started searching for another app. Then I checked the 'Notes 1.0.0\bearer' folder and found a file called "qnativewifibearer.dll"

I deleted the file and it WORKED!!! No more WiFi spikes. Just writing you this because it might occur in the next versions of Notes and may hugely distract users.

WLAN Device is: Realtek RTL8821CE 802.11ac PCIe Adapter (PCI\VEN_10EC&DEV_C821&SUBSYS_831A103C&REV_00)

Believe me or not, but it's not about drivers. I did tried everything, except for the Windows reinstall. But when I deleted the file it worked!

Hope it will help you somehow!

Cheers!
....

Tagging you guys here @theshadowx, @bjorn if you have an idea.

nuttyartist avatar Jun 05 '20 18:06 nuttyartist

I think this one comes with QNetworkAccessManager, it is to acces to wifi

Maybe the update feature is checking for update at high rate

theshadowx avatar Jun 05 '20 19:06 theshadowx

QNetworkAccessManager does not need the bearer plugin to access the WiFi. The bearer management in Qt is about querying and controlling whether the internet is on and such things and was mostly needed for mobile devices. Apparently it's also deprecated now and scheduled for removal in Qt 6.0.

We should just make sure not to ship this plugin.

bjorn avatar Jun 05 '20 20:06 bjorn

@bjorn Great, we will do so. I'm keeping this issue open until we make sure to keep it out in the process of generating the packages.

nuttyartist avatar Jun 06 '20 15:06 nuttyartist

Another user reported this issue, @bjorn do you think telling him to delete the plugin folder from the executable folder will solve this issue? Is it safe?

nuttyartist avatar Jul 12 '20 17:07 nuttyartist

@nuttyartist There are plugins that are required for Notes to work properly, like the image loading plugins and platform plugins, so you should tell this user to only delete the bearer folder.

bjorn avatar Jul 12 '20 18:07 bjorn

Okay Thanks, I read the post and it said that I should delete the qnativewifibearer.dll in the Notes 1.0.0/bearer folder. I deleted it and launched notes from the Notes 1.0.0 folder and it worked. Im not experiencing any lag issues. Thank you so much<3 i really enjoy the app

@bjorn Thanks!

nuttyartist avatar Jul 14 '20 08:07 nuttyartist

I just want to post to say that this is still an issue with 2.0.0. Massive wifi spikes every 10 seconds - exclusive to this app. They start with the launch of the app and stop after the app is closed and the tray icon is exited.

I upgraded from 1.0.0 which had the same problem.

I can also confirm that deleting the bearer file fixes the issue.

Did 2.0.0 install a new bearer file? or did it simply not delete the old one and still call it?

DAW-GUN avatar Dec 31 '22 00:12 DAW-GUN

@DAW-GUN Qt5 or Qt6?

zjeffer avatar Dec 31 '22 13:12 zjeffer

I just want to post to say that this is still an issue with 2.0.0. Massive wifi spikes every 10 seconds - exclusive to this app. They start with the launch of the app and stop after the app is closed and the tray icon is exited.

I upgraded from 1.0.0 which had the same problem.

I can also confirm that deleting the bearer file fixes the issue.

Did 2.0.0 install a new bearer file? or did it simply not delete the old one and still call it?

I just tested this binary (https://github.com/nuttyartist/notes/actions/runs/3351423392) and the bearer folder isn't installed. Not even version 2.0.0 installs the bearer folder so it's weird you even saw that. Maybe when upgrading to version 2.0.0 you didn't uninstall the previous version and it just installed everything on top of the previous one without deleting the previous files? I'm just guessing, although it seems improbable since it has a different version name and should be installed in a different folder.

nuttyartist avatar Dec 31 '22 15:12 nuttyartist

That's correct: I didn't manually uninstall the previous version and 2.0.0 just installed everything on top of the previous one.

DAW-GUN avatar Jan 05 '23 22:01 DAW-GUN

@nuttyartist I guess this issue can be closed, then?

zjeffer avatar Jan 05 '23 22:01 zjeffer

@zjeffer I think so. @DAW-GUN Let us please know if the problem still persists.

nuttyartist avatar Jan 07 '23 09:01 nuttyartist

Thanks. As I mentioned, I was able to fix the issue by manually deleting the qnativewifibearer.dll file left behind by the old version. My only suggestion is that the installer removes old files so that the user doesn't have to figure it out on their own.

DAW-GUN avatar Jan 11 '23 22:01 DAW-GUN

That's a good suggestion. @guihkx Is it possible for InnoSetup to delete older version files? Exactly how our update mechanism works now? I think we only download the installer, and it installs everything on top of previous versions. I don't think it's ideal. Isn't it?

nuttyartist avatar Jan 14 '23 14:01 nuttyartist

Is it possible for InnoSetup to delete older version files?

Hmm... I'm not sure it can, but I also don't see why it couldn't. 😄

We can probably tell Inno to invoke the uninstaller of the previous version before installing the new version, or something like that.

We just have to figure out where Notes was installed (we can probably check using a registry key or something).

I think we only download the installer, and it installs everything on top of previous versions

That's a good question, and I haven't actually tried doing that. I'll see what can be done.

guihkx avatar Jan 14 '23 16:01 guihkx

We can probably tell Inno to invoke the uninstaller of the previous version before installing the new version, or something like that.

I just implemented this in #447.

If someone wants to test it, feel free to grab the latest installer in development from here.

Just make sure to have an old version of Notes installed before running the new installer, of course. :p

guihkx avatar Jan 18 '23 21:01 guihkx

We can probably tell Inno to invoke the uninstaller of the previous version before installing the new version, or something like that.

I just implemented this in #447.

If someone wants to test it, feel free to grab the latest installer in development from here.

Just make sure to have an old version of Notes installed before running the new installer, of course. :p

Awesome, I'll test this.

nuttyartist avatar Jan 19 '23 10:01 nuttyartist