"Invalid API response from Nvidia" when opening EnvyUpdate #31

Closed
opened 2023-03-29 15:33:00 +02:00 by sfaria · 31 comments
sfaria commented 2023-03-29 15:33:00 +02:00 (Migrated from github.com)

EnvyUpdate version: 2.17 (latest)
Windows 11 22H2 (22621.1413)
GPU: RTX 4080 Founders Edition

error_message

Unfortunately, there doesn't seem to be any logging, so I can't really provide any more information.

EnvyUpdate version: 2.17 (latest) Windows 11 22H2 (22621.1413) GPU: RTX 4080 Founders Edition ![error_message](https://user-images.githubusercontent.com/298792/228554142-b7ddc521-1b59-44d8-9bc1-66c000bf01ca.png) Unfortunately, there doesn't seem to be any logging, so I can't really provide any more information.
fyr77 commented 2023-03-29 23:58:01 +02:00 (Migrated from github.com)

Ah, I think I know what the problem is. Creating some kind of logging here would be smart for future problems, I will include that in the next patch.
I believe your GPU's name actually includes the "Founders Edition" string, so my code fails to detect it properly. Up until now, I just filtered out these suffixes manually, but I think I should rethink my method here.
Patch is incoming the next few days.

Ah, I think I know what the problem is. Creating some kind of logging here would be smart for future problems, I will include that in the next patch. I believe your GPU's name actually includes the "Founders Edition" string, so my code fails to detect it properly. Up until now, I just filtered out these suffixes manually, but I think I should rethink my method here. Patch is incoming the next few days.
sfaria commented 2023-03-30 10:30:58 +02:00 (Migrated from github.com)

Awesome, thanks for the update! if you need any additional information from me to debug just tell me.

Awesome, thanks for the update! if you need any additional information from me to debug just tell me.
fyr77 commented 2023-04-01 18:19:08 +02:00 (Migrated from github.com)

Alright, I think I fixed it in 7173f2ec5e and version 2.18. Please test it and see if it works for you. @sfaria

Alright, I think I fixed it in 7173f2ec5e15f27c49398b7c88e77207e90370b0 and version [2.18](https://github.com/fyr77/EnvyUpdate/releases/tag/2.18). Please test it and see if it works for you. @sfaria
sfaria commented 2023-04-01 19:55:41 +02:00 (Migrated from github.com)

I get the same response popup using 2.18. I took a look at your code and did a little digging:

Since I don't really do C# or have an environment, I'm going to hobble around with PowerShell and try to use the same detection method you're using:

$VideoControllers = Get-WmiObject -Query "SELECT * FROM Win32_VideoController"
$VideoControllers.GetPropertyValue("Description")

This gives me the value NVIDIA GeForce RTX 4080. There doesn't seem to be any reference to "Founder's Edition" in there, unfortunately.

 $VideoControllers.GetPropertyValue("DriverVersion")

Gives me 31.0.15.3141

$OfflineGPUVersion = $VideoControllers.GetPropertyValue("DriverVersion")
$OfflineGPUVersion = $OfflineGpuVersion.Replace(".", "")
$Index = (([array]0,($OfflineGPUVersion.Length-5)) | measure -Maximum).Maximum
$OfflineGPUVersion = $OfflineGPUVersion.Substring($Index)
$OfflineGPUVersion = $OfflineGPUVersion.Substring(0, 3) + "." + $OfflineGPUVersion.Substring(3)

Returns 531.41, which seems sensible so that's working.

GPU Detection seems to work now:

$GPUName = $VideoControllers.GetPropertyValue("VideoProcessor").ToLower()

Outputs nvidia geforce rtx 4080

$GPUName -match '(geforce )?.tx \w*\d*'

Returns True.

Maybe you can use some of this output to figure out what's going on?

I get the same response popup using 2.18. I took a look at your code and did a little digging: Since I don't really do C# or have an environment, I'm going to hobble around with PowerShell and try to use the same detection method you're using: ```powershell $VideoControllers = Get-WmiObject -Query "SELECT * FROM Win32_VideoController" $VideoControllers.GetPropertyValue("Description") ``` This gives me the value `NVIDIA GeForce RTX 4080`. There doesn't seem to be any reference to "Founder's Edition" in there, unfortunately. ```powershell $VideoControllers.GetPropertyValue("DriverVersion") ``` Gives me `31.0.15.3141` ```powershell $OfflineGPUVersion = $VideoControllers.GetPropertyValue("DriverVersion") $OfflineGPUVersion = $OfflineGpuVersion.Replace(".", "") $Index = (([array]0,($OfflineGPUVersion.Length-5)) | measure -Maximum).Maximum $OfflineGPUVersion = $OfflineGPUVersion.Substring($Index) $OfflineGPUVersion = $OfflineGPUVersion.Substring(0, 3) + "." + $OfflineGPUVersion.Substring(3) ``` Returns `531.41`, which seems sensible so that's working. GPU Detection seems to work now: ```powershell $GPUName = $VideoControllers.GetPropertyValue("VideoProcessor").ToLower() ``` Outputs `nvidia geforce rtx 4080` ```powershell $GPUName -match '(geforce )?.tx \w*\d*' ``` Returns True. Maybe you can use some of this output to figure out what's going on?
fyr77 commented 2023-04-01 19:57:18 +02:00 (Migrated from github.com)

Hmm, very odd. I'll look into it, thanks for the info.

Hmm, very odd. I'll look into it, thanks for the info.
sfaria commented 2023-04-01 19:58:13 +02:00 (Migrated from github.com)

No problem, if you need any info dumps please let me know.

No problem, if you need any info dumps please let me know.
fyr77 commented 2023-04-01 20:28:38 +02:00 (Migrated from github.com)

@sfaria I made a new build from commit 6a10abc334, please try this one. It should still throw an error, but a more useful one this time.
https://github.com/fyr77/EnvyUpdate/releases/tag/2.19-pre1

@sfaria I made a new build from commit 6a10abc334a1ce10978aef3b3c39c006ef9a11ef, please try this one. It should still throw an error, but a more useful one this time. https://github.com/fyr77/EnvyUpdate/releases/tag/2.19-pre1
sfaria commented 2023-04-01 20:42:18 +02:00 (Migrated from github.com)

Here's what it output:

image

Here's what it output: ![image](https://user-images.githubusercontent.com/298792/229308698-0f11c16f-7859-437b-a2e1-4146191f5196.png)
fyr77 commented 2023-04-03 18:56:30 +02:00 (Migrated from github.com)

Very strange, it seems that EnvyUpdate cannot properly find your GPU in the Nvidia master list. Could you try opening this URL in a browser? It should give you a massive XML list of graphics cards: https://www.nvidia.com/Download/API/lookupValueSearch.aspx?TypeID=3

Very strange, it seems that EnvyUpdate cannot properly find your GPU in the Nvidia master list. Could you try opening this URL in a browser? It should give you a massive XML list of graphics cards: https://www.nvidia.com/Download/API/lookupValueSearch.aspx?TypeID=3
sfaria commented 2023-04-03 20:41:58 +02:00 (Migrated from github.com)

It resolves, and here is the chunk with both 4080 and 4080 mobile:

<LookupValue ParentID="127">
<Name>NVIDIA GeForce RTX 4080</Name>
<Value>999</Value>
</LookupValue>
<LookupValue ParentID="127">
</LookupValue>
<LookupValue ParentID="128">
<Name>L4</Name>
<Value>1009</Value>
</LookupValue>
<LookupValue ParentID="128">
<Name>L40</Name>
<Value>1003</Value>
</LookupValue>
<LookupValue ParentID="129">
<Name>GeForce RTX 4090 Laptop GPU</Name>
<Value>1004</Value>
</LookupValue>
<LookupValue ParentID="129">
<Name>GeForce RTX 4080 Laptop GPU</Name>
<Value>1005</Value>
</LookupValue>
It resolves, and here is the chunk with both 4080 and 4080 mobile: ```xml <LookupValue ParentID="127"> <Name>NVIDIA GeForce RTX 4080</Name> <Value>999</Value> </LookupValue> <LookupValue ParentID="127"> </LookupValue> <LookupValue ParentID="128"> <Name>L4</Name> <Value>1009</Value> </LookupValue> <LookupValue ParentID="128"> <Name>L40</Name> <Value>1003</Value> </LookupValue> <LookupValue ParentID="129"> <Name>GeForce RTX 4090 Laptop GPU</Name> <Value>1004</Value> </LookupValue> <LookupValue ParentID="129"> <Name>GeForce RTX 4080 Laptop GPU</Name> <Value>1005</Value> </LookupValue> ```
fyr77 commented 2023-04-03 21:03:27 +02:00 (Migrated from github.com)

Alright, thank you for checking. Please use this build, it should create a log file envyupdate.log. Please share the log file here. @sfaria

Alright, thank you for checking. Please use [this build](https://github.com/fyr77/EnvyUpdate/releases/tag/2.19-pre3), it should create a log file `envyupdate.log`. Please share the log file here. @sfaria
sfaria commented 2023-04-03 21:49:46 +02:00 (Migrated from github.com)

Ran the app once - I've attached the log.

envyupdate.log

Ran the app once - I've attached the log. [envyupdate.log](https://github.com/fyr77/EnvyUpdate/files/11141923/envyupdate.log)
sfaria commented 2023-05-08 14:09:15 +02:00 (Migrated from github.com)

Did you ever figure out what was wrong?

Did you ever figure out what was wrong?
fyr77 commented 2023-05-08 14:13:48 +02:00 (Migrated from github.com)

@sfaria Sorry for not keeping you updated, university had me occupied - I was not able to figure out the problem so far. Somewhere the data from your GPU gets lost - or never even read out properly. Could you perhaps contact me via email? Perhaps we could debug the code directly on your machine to figure out where the data gets lost...

@sfaria Sorry for not keeping you updated, university had me occupied - I was not able to figure out the problem so far. Somewhere the data from your GPU gets lost - or never even read out properly. Could you perhaps contact me via email? Perhaps we could debug the code directly on your machine to figure out where the data gets lost...
sfaria commented 2023-05-08 14:15:37 +02:00 (Migrated from github.com)

Hey, no worries! You should concentrate on your exams - I'll pull down the project and do some debugging myself. I'll make a PR once I figure it out.

Hey, no worries! You should concentrate on your exams - I'll pull down the project and do some debugging myself. I'll make a PR once I figure it out.
fyr77 commented 2023-05-08 14:17:14 +02:00 (Migrated from github.com)

Alright, thank you! That codebase is a bit old and not always completely logical... (I should rewrite a few things probably) - please ask if anything seems off.

Alright, thank you! That codebase is a bit old and not always completely logical... (I should rewrite a few things probably) - please ask if anything seems off.
fyr77 commented 2023-07-08 23:19:41 +02:00 (Migrated from github.com)

I have gotten my hands on a GTX 1080 Ti, which seems to have triggered the same issue you were having. I will release 2.19 now, please test that when you have the time. @sfaria

I have gotten my hands on a GTX 1080 Ti, which seems to have triggered the same issue you were having. I will release 2.19 now, please test that when you have the time. @sfaria
sfaria commented 2023-07-09 14:14:39 +02:00 (Migrated from github.com)

Hey! Thanks for looking into this. Sorry I didn't get time to look into the issue myself - I started a new job search shortly after our last update and didn't get the time.

I'll install the latest version and let you know.

Hey! Thanks for looking into this. Sorry I didn't get time to look into the issue myself - I started a new job search shortly after our last update and didn't get the time. I'll install the latest version and let you know.
sfaria commented 2023-07-09 14:16:03 +02:00 (Migrated from github.com)

Same issue:

image

Same issue: ![image](https://github.com/fyr77/EnvyUpdate/assets/298792/44db6e0f-c180-4725-888b-49454abd220c)
fyr77 commented 2023-07-09 14:44:03 +02:00 (Migrated from github.com)

Hmm, very unfortunate. I did fix another issue at least.
I'll keep looking into it.

Hmm, very unfortunate. I did fix another issue at least. I'll keep looking into it.
fyr77 commented 2023-07-09 18:41:40 +02:00 (Migrated from github.com)

Hi again @sfaria.
I have released another new version with some internal improvements to logic, but I don't expect this to fix the problem. Still, I added a button in the settings to enable logging and improved the log messages, so I would appreciate it if you could share another log file from 2.20.

If it helps in any way, here is one from my current system:
envyupdate.log

Hi again @sfaria. I have released another new version with some internal improvements to logic, but I don't expect this to fix the problem. Still, I added a button in the settings to enable logging and improved the log messages, so I would appreciate it if you could share another log file from 2.20. If it helps in any way, here is one from my current system: [envyupdate.log](https://github.com/fyr77/EnvyUpdate/files/11995659/envyupdate.log)
sfaria commented 2023-07-10 13:21:19 +02:00 (Migrated from github.com)

Hey @fyr77!

Great work on getting logging in - I enabled it and restarted the program. I've attached the log output. Thanks!

envyupdate.log

Hey @fyr77! Great work on getting logging in - I enabled it and restarted the program. I've attached the log output. Thanks! [envyupdate.log](https://github.com/fyr77/EnvyUpdate/files/12001292/envyupdate.log)
nezorflame commented 2023-08-06 12:45:46 +02:00 (Migrated from github.com)

Got the same error.
RTX 4080 Laptop, version 2.20.

Latest current driver is here: https://www.nvidia.com/download/driverResults.aspx/209268/en-us/

Log contents:

------
INFO Enabled logging to file. Restart Application to see full startup log.
------
INFO Found log file, will start logging to this.
INFO Starting EnvyUpdate, version 2.20
INFO Found Win32_Battery, assuming mobile device.
INFO Mobile: True
INFO Looking for driver version in ManagementObjects
INFO Found driver in ManagementObjects.
INFO Local driver version: 531.61
INFO Local driver version already known, updating info without reloading.
INFO Updating local driver version in UI.
INFO Trying to get GPU name from ManagementObjects...
INFO Found GPU name: NVIDIA GeForce RTX 4080 Laptop GPU
INFO Detecting driver type.
INFO Trying to find DCH key in registry...
INFO Done detecting driver type: DCH
INFO Started check timer.
INFO Started update file system watcher.
INFO Found standard driver.
INFO Trying to get GPU update URL.
INFO Getting Nvidia GPU list...
INFO Got Nvidia GPU list.
INFO Trying to get GPU name from ManagementObjects...
INFO Found GPU name: geforce rtx 4080
INFO Got psid: 0
INFO Getting Nvidia GPU list...
INFO Got Nvidia GPU list.
INFO Trying to get GPU name from ManagementObjects...
INFO Found GPU name: geforce rtx 4080
INFO Got pfid: 0
INFO Getting Nvidia GPU list...
INFO Got Nvidia GPU list.
WARN Ignore previous warning, just getting osid.
INFO Got osid: 57
INFO Trying to find DCH key in registry...
INFO Getting GPU URLs. IDs in order psid, pfid, osid, dtcid, dtid: 0, 0, 57, 1, 1
INFO Built GPU URL: http://www.nvidia.com/Download/processDriver.aspx?psid=0&pfid=0&osid=57&dtcid=1&dtid=1
INFO Downloaded driver page URL: <li>No certified downloads were found for this configuration. To include beta downloads in your search, click <a href='Find.aspx?lang=en-us'>here</a>.</li>
WARN Could not get GPU update URL, trying again with non-studio driver.
INFO Getting Nvidia GPU list...
INFO Got Nvidia GPU list.
INFO Trying to get GPU name from ManagementObjects...
INFO Found GPU name: geforce rtx 4080
INFO Got psid: 0
INFO Getting Nvidia GPU list...
INFO Got Nvidia GPU list.
INFO Trying to get GPU name from ManagementObjects...
INFO Found GPU name: geforce rtx 4080
INFO Got pfid: 0
INFO Getting Nvidia GPU list...
INFO Got Nvidia GPU list.
WARN Ignore previous warning, just getting osid.
INFO Got osid: 57
INFO Trying to find DCH key in registry...
INFO Getting GPU URLs. IDs in order psid, pfid, osid, dtcid, dtid: 0, 0, 57, 1, 1
INFO Built GPU URL: http://www.nvidia.com/Download/processDriver.aspx?psid=0&pfid=0&osid=57&dtcid=1&dtid=1
INFO Downloaded driver page URL: <li>No certified downloads were found for this configuration. To include beta downloads in your search, click <a href='Find.aspx?lang=en-us'>here</a>.</li>
FATAL Invalid API response from Nvidia. Attempted API call: http://www.nvidia.com/Download/processDriver.aspx?psid=0&pfid=0&osid=57&dtcid=1&dtid=1

image
image

Got the same error. RTX 4080 Laptop, version 2.20. Latest current driver is here: https://www.nvidia.com/download/driverResults.aspx/209268/en-us/ Log contents: ```text ------ INFO Enabled logging to file. Restart Application to see full startup log. ------ INFO Found log file, will start logging to this. INFO Starting EnvyUpdate, version 2.20 INFO Found Win32_Battery, assuming mobile device. INFO Mobile: True INFO Looking for driver version in ManagementObjects INFO Found driver in ManagementObjects. INFO Local driver version: 531.61 INFO Local driver version already known, updating info without reloading. INFO Updating local driver version in UI. INFO Trying to get GPU name from ManagementObjects... INFO Found GPU name: NVIDIA GeForce RTX 4080 Laptop GPU INFO Detecting driver type. INFO Trying to find DCH key in registry... INFO Done detecting driver type: DCH INFO Started check timer. INFO Started update file system watcher. INFO Found standard driver. INFO Trying to get GPU update URL. INFO Getting Nvidia GPU list... INFO Got Nvidia GPU list. INFO Trying to get GPU name from ManagementObjects... INFO Found GPU name: geforce rtx 4080 INFO Got psid: 0 INFO Getting Nvidia GPU list... INFO Got Nvidia GPU list. INFO Trying to get GPU name from ManagementObjects... INFO Found GPU name: geforce rtx 4080 INFO Got pfid: 0 INFO Getting Nvidia GPU list... INFO Got Nvidia GPU list. WARN Ignore previous warning, just getting osid. INFO Got osid: 57 INFO Trying to find DCH key in registry... INFO Getting GPU URLs. IDs in order psid, pfid, osid, dtcid, dtid: 0, 0, 57, 1, 1 INFO Built GPU URL: http://www.nvidia.com/Download/processDriver.aspx?psid=0&pfid=0&osid=57&dtcid=1&dtid=1 INFO Downloaded driver page URL: <li>No certified downloads were found for this configuration. To include beta downloads in your search, click <a href='Find.aspx?lang=en-us'>here</a>.</li> WARN Could not get GPU update URL, trying again with non-studio driver. INFO Getting Nvidia GPU list... INFO Got Nvidia GPU list. INFO Trying to get GPU name from ManagementObjects... INFO Found GPU name: geforce rtx 4080 INFO Got psid: 0 INFO Getting Nvidia GPU list... INFO Got Nvidia GPU list. INFO Trying to get GPU name from ManagementObjects... INFO Found GPU name: geforce rtx 4080 INFO Got pfid: 0 INFO Getting Nvidia GPU list... INFO Got Nvidia GPU list. WARN Ignore previous warning, just getting osid. INFO Got osid: 57 INFO Trying to find DCH key in registry... INFO Getting GPU URLs. IDs in order psid, pfid, osid, dtcid, dtid: 0, 0, 57, 1, 1 INFO Built GPU URL: http://www.nvidia.com/Download/processDriver.aspx?psid=0&pfid=0&osid=57&dtcid=1&dtid=1 INFO Downloaded driver page URL: <li>No certified downloads were found for this configuration. To include beta downloads in your search, click <a href='Find.aspx?lang=en-us'>here</a>.</li> FATAL Invalid API response from Nvidia. Attempted API call: http://www.nvidia.com/Download/processDriver.aspx?psid=0&pfid=0&osid=57&dtcid=1&dtid=1 ``` ![image](https://github.com/fyr77/EnvyUpdate/assets/3906766/b40382c0-62b6-4fed-8403-653f350ec28b) ![image](https://github.com/fyr77/EnvyUpdate/assets/3906766/2d0f01de-6226-4221-b8ec-b90c27cba147)
fyr77 commented 2023-08-06 17:28:00 +02:00 (Migrated from github.com)

I may have found the issue. Nvidia switched their titling in the 40 series, from "GeForce RTX 3080" to "NVIDIA GeForce RTX 4080". I believe my code does not account for this. I am currently not home, I will attempt to fix this for the next release and also release a fixed 2.X version by the end of the coming week.

I may have found the issue. Nvidia switched their titling in the 40 series, from "GeForce RTX 3080" to "NVIDIA GeForce RTX 4080". I believe my code does not account for this. I am currently not home, I will attempt to fix this for the next release and also release a fixed 2.X version by the end of the coming week.
nezorflame commented 2023-08-06 22:48:02 +02:00 (Migrated from github.com)

@fyr77 sounds great, feel free to ping me to test it!

@fyr77 sounds great, feel free to ping me to test it!
fyr77 commented 2023-08-11 22:44:05 +02:00 (Migrated from github.com)

I have just released 2.21, please test this version. It should fix your issue.

I have just released 2.21, please test this version. It should fix your issue.
nezorflame commented 2023-08-12 03:48:41 +02:00 (Migrated from github.com)

@fyr77 indeed, it works now. Thanks!

@fyr77 indeed, it works now. Thanks!
fyr77 commented 2023-08-12 09:38:39 +02:00 (Migrated from github.com)

@nezorflame Wonderful!

@sfaria If possible, please confirm it works for you as well. If yes, I will close the issue.

@nezorflame Wonderful! @sfaria If possible, please confirm it works for you as well. If yes, I will close the issue.
sfaria commented 2023-08-12 14:42:36 +02:00 (Migrated from github.com)

@fyr77 - Working now for me as well. Great work, and thanks for looking into this!

@fyr77 - Working now for me as well. Great work, and thanks for looking into this!
nezorflame commented 2023-08-12 18:58:12 +02:00 (Migrated from github.com)

Just an FYI - for some reason WIndows Defender now considers your new version a trojan: https://www.microsoft.com/en-us/wdsi/threats/malware-encyclopedia-description?name=Trojan%3AWin32%2FBearfoos.A!ml&threatid=2147731250

Just an FYI - for some reason WIndows Defender now considers your new version a trojan: https://www.microsoft.com/en-us/wdsi/threats/malware-encyclopedia-description?name=Trojan%3AWin32%2FBearfoos.A!ml&threatid=2147731250
fyr77 commented 2023-08-12 19:24:10 +02:00 (Migrated from github.com)

@nezorflame Annoying... Thank you for the heads-up. It is amusing, since I merely changed two lines of code which should have no impact on virus detection.
Weirdly enough, my own installation of Windows 11 does not recognize it as a virus. As always, Windows Defender is a mystery ;)

@nezorflame Annoying... Thank you for the heads-up. It is amusing, since I merely changed two lines of code which should have no impact on virus detection. Weirdly enough, my own installation of Windows 11 does not recognize it as a virus. As always, Windows Defender is a mystery ;)
This repository is archived. You cannot comment on issues.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: fyr77/EnvyUpdate#31
No description provided.