Timthreetwelve / GetMyIP

Display IP address and geolocation information
MIT License
14 stars 4 forks source link

Enhancement Request #107

Closed CMTriX closed 1 week ago

CMTriX commented 1 month ago

Brief summary of your request

auto refresh at start

Request details

I Would like to see a option in the program to initiate a refresh of the ip when the program is started and when opened if it is running on the background when clicking the tray icon/shortcut.

Anything else?

Decorate my Xmass tree!

Timthreetwelve commented 1 month ago

@CMTriX To make sure that I understand your request, are you asking for the IP information to be refreshed when the GetMyIP window is shown after previously being minimized to the tray?

Also, your request says:

to initiate a refresh of the ip when the program is started

GetMyIP already refreshes the IP information when it starts. This makes me wonder if I'm not understanding this part of the request or if it's not working correctly. Please help me understand.

Decorate my Xmass tree!

tree How's that?

CMTriX commented 1 month ago

Hi Tim! The auto refresh works fine.

i would like to have a option when the application is started/being showed after recent minimized.

The tree looks amazing!

Timthreetwelve commented 1 month ago

@CMTriX, I understand. I should have thought of that scenario, thanks for bringing it to my attention.

I've figured out most of the changes needed, so you can expect your request to be in the next version.

There will be some new strings to translate. I'll update this issue when I'm done updating en-US.

Tim

Timthreetwelve commented 4 weeks ago

@CMTriX, I just pushed the latest en-US language additions to GitHub along with your enhancement.

Tim

CMTriX commented 3 weeks ago

Thank you for this modification.

Can you add the label REFRESHING/REFRESHED to the screen also, when the automatic refresh is done/running? I checked the automatic refresh option, the program is in tray. I double click icon on desktop, but i don't see the auto refresh working. The old IP is still displayed. I also not see a refresh when i click the tray icon.

Timthreetwelve commented 3 weeks ago

@CMTriX, I'm so sorry it's not working for you. Let's get the bug fixed and then add the label to the screen.

First, check the setting in the yellow box and see if it is checked.

2024-11-10_12-07-43

If it is checked, then copy the settings file Ctrl+Shift+S, and the log file three-dot menu then View Log File and either paste them into this issue or attach them to the issue, whichever is easiest for you.

Tim

CMTriX commented 3 weeks ago

2024/11/11 08:04:54.28 INFO GetMyIP (Get My IP) 0.11.3.0 is starting up 2024/11/11 08:04:54.30 INFO GetMyIP © 2019 - 2024 Tim Kennedy 2024/11/11 08:04:54.30 DEBUG GetMyIP Build date: woensdag 6 november 2024 19:56 (UTC) 2024/11/11 08:04:54.30 DEBUG GetMyIP Commit ID: 0fc5ea5 2024/11/11 08:04:54.30 DEBUG GetMyIP was started from C:\Users\AppData\Local\Programs\T_K\Get My IP\GetMyIP.exe 2024/11/11 08:04:54.30 DEBUG GetMyIP Process ID: 6172 2024/11/11 08:04:54.30 DEBUG Operating System version: Microsoft Windows 10.0.26100 2024/11/11 08:04:54.30 DEBUG .NET version: 8.0.10 2024/11/11 08:04:54.30 DEBUG Startup culture: nl-NL UI: nl-NL 2024/11/11 08:04:54.30 DEBUG Current culture: en-US UI: en-US 2024/11/11 08:04:54.30 DEBUG 267 strings loaded from Languages/Strings.en-US.xaml 2024/11/11 08:04:54.58 DEBUG Starting discovery of internal IP information. 2024/11/11 08:04:54.65 DEBUG Starting discovery of external IP information. 2024/11/11 08:04:54.65 DEBUG Connecting to: https://api.seeip.org 2024/11/11 08:04:54.67 DEBUG Internal IPv4 Address is ###.###.#.# 2024/11/11 08:04:54.67 DEBUG Internal IPv4 Address is ###.###.##.# 2024/11/11 08:04:54.67 DEBUG Internal IPv4 Address is ###.###.###.# 2024/11/11 08:04:54.67 DEBUG Internal IPv6 Address is XX##::###X:X###:###X:X#X#%## 2024/11/11 08:04:54.67 DEBUG Internal IPv6 Address is #X##:X###:##X#:#:X#X#:#X#X:##X#:XX#X 2024/11/11 08:04:54.67 DEBUG Internal IPv6 Address is #X##:X###:##X#:#:##XX:X###:XX#X:###X 2024/11/11 08:04:54.67 DEBUG Internal IPv6 Address is XX##::####:X##X:X##X:#X##%# 2024/11/11 08:04:54.67 DEBUG Internal IPv6 Address is XX##::X###:#X##:##X#:###%## 2024/11/11 08:04:54.67 DEBUG Discovering internal addresses took 37.00 ms 2024/11/11 08:04:54.80 DEBUG Refresh timer started. Refresh interval is 5 minutes 2024/11/11 08:04:55.12 DEBUG Received status code: OK - OK from https://api.seeip.org 2024/11/11 08:04:55.12 DEBUG Discovering external IP information took 471.45 ms 2024/11/11 08:04:55.12 DEBUG External IP Address is #X##:X###:##X#:#:X#X#:#X#X:##X#:XX#X 2024/11/11 08:04:55.12 DEBUG City is XXXXX 2024/11/11 08:04:55.12 DEBUG State is XXXXXXXXX 2024/11/11 08:04:55.12 DEBUG State is XX 2024/11/11 08:04:55.12 DEBUG Country is XXXXXXXXXXX 2024/11/11 08:04:55.12 DEBUG Country Code is XX 2024/11/11 08:04:55.12 DEBUG Zip Code is #### 2024/11/11 08:04:55.12 DEBUG Continent Code is XX 2024/11/11 08:04:55.12 DEBUG Longitude is #.#### 2024/11/11 08:04:55.12 DEBUG Latitude is ##.#### 2024/11/11 08:04:55.12 DEBUG Time Zone is XXXXXX/XXXXXXXXX 2024/11/11 08:04:55.12 DEBUG Offset from UTC is +##:## 2024/11/11 08:04:55.12 DEBUG AS Number is #### 2024/11/11 08:04:55.12 DEBUG Organization is XXX X.X. 2024/11/11 08:04:55.12 DEBUG External IP information provider is XXXXX.XXX 2024/11/11 08:04:55.12 DEBUG Tooltip is 62 bytes 2024/11/11 08:05:33.96 DEBUG This instance of GetMyIP was activated because another instance attempted to start. 2024/11/11 08:05:38.86 DEBUG Refreshing IP information 2024/11/11 08:05:38.86 DEBUG Starting discovery of internal IP information. 2024/11/11 08:05:38.96 DEBUG Starting discovery of external IP information. 2024/11/11 08:05:38.96 DEBUG Connecting to: https://api.seeip.org 2024/11/11 08:05:38.96 DEBUG Internal IPv4 Address is ###.##.##.## 2024/11/11 08:05:38.96 DEBUG Internal IPv4 Address is ###.###.#.# 2024/11/11 08:05:38.96 DEBUG Internal IPv4 Address is ###.###.##.# 2024/11/11 08:05:38.96 DEBUG Internal IPv4 Address is ###.###.###.# 2024/11/11 08:05:38.96 DEBUG Internal IPv6 Address is XX##::###X:X###:###X:X#X#%## 2024/11/11 08:05:38.96 DEBUG Internal IPv6 Address is #X##:X###:##X#:#:X#X#:#X#X:##X#:XX#X 2024/11/11 08:05:38.96 DEBUG Internal IPv6 Address is #X##:X###:##X#:#:##XX:X###:XX#X:###X 2024/11/11 08:05:38.96 DEBUG Internal IPv6 Address is XX##::####:X##X:X##X:#X##%# 2024/11/11 08:05:38.96 DEBUG Internal IPv6 Address is XX##::X###:#X##:##X#:###%## 2024/11/11 08:05:38.96 DEBUG Discovering internal addresses took 7.01 ms 2024/11/11 08:05:39.47 DEBUG Received status code: OK - OK from https://api.seeip.org 2024/11/11 08:05:39.47 DEBUG Discovering external IP information took 510.11 ms 2024/11/11 08:05:39.47 DEBUG External IP Address is ##.###.###.### 2024/11/11 08:05:39.47 DEBUG City is 2024/11/11 08:05:39.47 DEBUG State is 2024/11/11 08:05:39.47 DEBUG State is 2024/11/11 08:05:39.47 DEBUG Country is XXXXXXXXXXX 2024/11/11 08:05:39.47 DEBUG Country Code is XX 2024/11/11 08:05:39.47 DEBUG Zip Code is 2024/11/11 08:05:39.47 DEBUG Continent Code is XX 2024/11/11 08:05:39.47 DEBUG Longitude is #.#### 2024/11/11 08:05:39.47 DEBUG Latitude is ##.#### 2024/11/11 08:05:39.47 DEBUG Time Zone is XXXXXX/XXXXXXXXX 2024/11/11 08:05:39.47 DEBUG Offset from UTC is +##:## 2024/11/11 08:05:39.47 DEBUG AS Number is # 2024/11/11 08:05:39.47 DEBUG Organization is 2024/11/11 08:05:39.47 DEBUG External IP information provider is XXXXX.XXX 2024/11/11 08:05:39.47 DEBUG Tooltip is 41 bytes 2024/11/11 08:07:43.35 DEBUG This instance of GetMyIP was activated because another instance attempted to start. 2024/11/11 08:08:20.87 DEBUG Opening C:\Users\AppData\Local\Temp\T_K\GetMyIP.20241111.log in default application

CMTriX commented 3 weeks ago

Nothing happens with Ctrl+Shift+S

Timthreetwelve commented 3 weeks ago

Hmm, try opening Settings, then Language Settings, then click on the Open App Folder button.

File Explorer should open the application's folder.

Open the usersettings.json with any text editor file and paste its contents here.

Thanks, Tim

CMTriX commented 3 weeks ago

{ "AutoRefresh": true, "AutoRefreshInterval": 5, "IncludeDebug": true, "IncludeV6": true, "InfoProvider": 1, "InitialPage": 1, "KeepOnTop": true, "LanguageTesting": false, "LogFile": "", "MapProvider": 1, "MinimizeToTray": true, "MinimizeToTrayOnClose": true, "NotifyOnIpChange": true, "ObfuscateLog": true, "PrimaryColor": 5, "RefreshAfterRestore": true, "SelectedFont": "Segoe UI", "RowSpacing": 0, "ShowExitInNav": true, "ShowHeader": false, "ShowASName": false, "ShowASNumber": false, "ShowCity": false, "ShowCountry": true, "ShowExternalIP": true, "ShowInternalIPv4": true, "ShowInternalIPv6": false, "ShowISP": false, "ShowIpVersion": false, "ShowOffset": false, "ShowLastRefresh": true, "ShowState": false, "ShowTimeZone": false, "StartCentered": true, "StartMinimized": true, "StartWithWindows": true, "TooltipHeading": "", "UILanguage": "en-US", "UISize": 3, "UITheme": 2, "UseOSLanguage": false, "WindowHeight": 575, "WindowLeft": 1500, "WindowWidth": 830, "WindowTop": 590 }

CMTriX commented 3 weeks ago

{ "runtimeOptions": { "tfm": "net8.0", "frameworks": [ { "name": "Microsoft.NETCore.App", "version": "8.0.0" }, { "name": "Microsoft.WindowsDesktop.App", "version": "8.0.0" } ], "configProperties": { "MVVMTOOLKIT_ENABLE_INOTIFYPROPERTYCHANGING_SUPPORT": true, "System.Reflection.Metadata.MetadataUpdater.IsSupported": false, "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": true } } }

Timthreetwelve commented 3 weeks ago

@CMTriX, thanks for the settings file. It looks good.

Looking at the log file, I noticed that when the app started it says:

2024/11/11 08:04:55.12 DEBUG External IP Address is #X##:X###:##X#:#:X#X#:#X#X:##X#:XX#X

I assume that you made a change to your network or VPN, because not a minute later is says:

2024/11/11 08:05:39.47 DEBUG External IP Address is ##.###.###.###

Even though the addresses are obfuscated, we can tell that they are different. So, the app is aware that the external IP address has changed.

I also see in the log:

2024/11/11 08:05:33.96 DEBUG This instance of GetMyIP was activated because another instance attempted to start.

This tells me that the app was not reopened from the tray icon, but that another instance of the app tried to start. GetMyIP is designed so that only one copy of the app can be active at a time. When a second copy tries to start it won't, it just switches to the first instance of the app, restoring it if it was minimized. Having said all of that, it should still update the IP information in the app and the tray icon.

Would you try again, this time let the app minimize to the tray, change the IP address, and then restore it by clicking the tray icon?

Let me know if that has any effect on the IP address that is displayed, and if not, please paste the application log that contains those activities.

In the meantime, I will put the code under a microscope and see if something is keeping it from showing the updated IP address.

Thanks a lot for your help diagnosing this issue,

Tim

CMTriX commented 2 weeks ago

Thank you. I will run some tests later this week step-by-step and drop the results here.

CMTriX commented 2 weeks ago

i changed the ip with vpn, minimized GetMYIP several times. Opening from icon on desktop or tray icon does not updates the ip. I am sorry :(

Timthreetwelve commented 2 weeks ago

@CMTriX, I just wanted to give you a quick update and let you know that I'm still working on this.

Tim

CMTriX commented 2 weeks ago

thnx for the update!

Timthreetwelve commented 2 weeks ago

@CMTriX, I'm confident that I found the cause and have made changes to remedy the issue. The next update will include the fix.

I'll close this issue for now. It can be reopened if the issue reoccurs in the next update.

Tim

CMTriX commented 2 weeks ago

Thank you!

Timthreetwelve commented 1 week ago

@CMTriX, I was set to release an update when I found another bug with refreshing after restoring a minimized window.

Reopening this issue.

Tim

Timthreetwelve commented 1 week ago

@CMTriX, I've fixed it for sure this time. 😉🤞🏻

Let me know if it's not working.

Thanks again, Tim