MuhammedKalkan / OpenLens

OpenLens Binary Build Repository
4.07k stars 272 forks source link

Autoupdate shows update and has error in main process (MacOS) #30

Closed mcasviper closed 2 years ago

mcasviper commented 2 years ago

I use OpenLens 6.0.0 on MacOS from your repo. Now it shows an Update and if I click on "Relaunch to Update Lens" it brings an JavaScript error. Uncaught Exception: Error: Tried to install update but no update was discovered. at /Applications/OpenLens.app/Contents/Resources/app.asar/static/build/main.js:1:298901 at /Applications/OpenLens.app/Contents/Resources/app.asar/node_modules/@ogre-tools/fp/build/index.js:1:53225 at /Applications/OpenLens.app/Contents/Resources/app.asar/node_modules/@ogre-tools/fp/build/index.js:1:53247 at /Applications/OpenLens.app/Contents/Resources/app.asar/node_modules/@ogre-tools/fp/build/index.js:1:53197 at /Applications/OpenLens.app/Contents/Resources/app.asar/node_modules/@ogre-tools/fp/build/index.js:1:19214 at S (/Applications/OpenLens.app/Contents/Resources/app.asar/node_modules/@ogre-tools/fp/build/index.js:1:53404) at IpcMainImpl.r (/Applications/OpenLens.app/Contents/Resources/app.asar/static/build/main.js:1:482472) at IpcMainImpl.emit (node:events:394:28) at IpcMainImpl.emit (node:domain:470:12) at Object.<anonymous> (node:electron/js2c/browser_init:165:9959)

MuhammedKalkan commented 2 years ago

Can not reproduce.

When i check updates it says

Update for version 6.0.0-latest.1660080682671 is not available (latest version: 6.0.0-latest.1660080682671, downgrade is disallowed).

Maybe try to clear contents of

/Users/<user>/Library/Application Support/Caches/open-lens-updater

MuhammedKalkan commented 2 years ago

Also try with new signed binaries produced as of now

busches commented 2 years ago

I just got this on Windows on 6.0.0 as I saw 6.0.1 was just published.

MuhammedKalkan commented 2 years ago

Please try both suggestions above and see if it is working.

Windows equivalent of cache C:\Users\user\AppData\Local\open-lens-updater\pending

busches commented 2 years ago

I'm on Windows, so I can't clear that path. I'm not sure what binary you want, I installed v6.0.0 about a hour ago. If I go to v6.0.1, there will be no update to test.

MuhammedKalkan commented 2 years ago

Windows equivalent of cache C:\Users\user\AppData\Local\open-lens-updater\pending

Try 6.0.0 to test update. Just got my windows and mac updated to 6.0.1 via Auto updater. no issues

busches commented 2 years ago

I deleted the pending folder, same issue. Inside open-lens-updater is an installer, I deleted that as well, same issue. I then hit recheck for updates and saw it recreate the pending folder and download an installer and then it disappeared and the same error occurred.

MuhammedKalkan commented 2 years ago

Seems as if there stays a config file somewhere, but i can not reproduce on my side. You may need to dig deeper and delete every folder which application creates

Then make a clean install

horihel commented 2 years ago

I can see the update being downloaded to pending, but then it vanishes. logs show this:

error: [UPDATE-APP/DOWNLOAD] New version 6.0.1-latest.1660157736010 is not signed by the application owner: publisherNames: Developer ID Application: Xaver Lohmueller (HGC72W36QJ), raw info: {
  "SignerCertificate": {
    "FriendlyName": "",
    "IssuerName": {
      "Name": "C=US, O=Apple Inc., OU=Apple Certification Authority, CN=Developer ID Certification Authority",
      "Oid": "System.Security.Cryptography.Oid"
    },
    "NotAfter": "/Date(1801519935000)/",
    "NotBefore": "/Date(1659435144000)/",
    "PrivateKey": null,
    "PublicKey": {
      "Key": "System.Security.Cryptography.RSACryptoServiceProvider",
      "Oid": "System.Security.Cryptography.Oid",
      "EncodedKeyValue": "System.Security.Cryptography.AsnEncodedData",
      "EncodedParameters": "System.Security.Cryptography.AsnEncodedData"
    },
    "SerialNumber": "25EFD0A4FD1ECD21",
    "SignatureAlgorithm": {
      "Value": "1.2.840.113549.1.1.11",
      "FriendlyName": "sha256RSA"
    },
    "Thumbprint": "5FFBE30D23D46588F51223E41913C6834E30B52F",
    "Version": 3,
    "Issuer": "C=US, O=Apple Inc., OU=Apple Certification Authority, CN=Developer ID Certification Authority",
    "Subject": "C=DE, O=Xaver Lohmueller, OU=HGC72W36QJ, CN=Developer ID Application: Xaver Lohmueller (HGC72W36QJ), OID.0.9.2342.19200300.100.1.1=HGC72W36QJ"
  },
  "TimeStamperCertificate": {
    "Archived": false,
    "Extensions": [
      "System.Security.Cryptography.X509Certificates.X509KeyUsageExtension",
      "System.Security.Cryptography.X509Certificates.X509BasicConstraintsExtension",
      "System.Security.Cryptography.X509Certificates.X509EnhancedKeyUsageExtension",
      "System.Security.Cryptography.X509Certificates.X509Extension",
      "System.Security.Cryptography.X509Certificates.X509Extension",
      "System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierExtension",
      "System.Security.Cryptography.X509Certificates.X509Extension",
      "System.Security.Cryptography.X509Certificates.X509Extension"
    ],
    "FriendlyName": "",
    "IssuerName": {
      "Name": "CN=DigiCert Trusted G4 RSA4096 SHA256 TimeStamping CA, O=\"DigiCert, Inc.\", C=US",
      "Oid": "System.Security.Cryptography.Oid"
    },
    "NotAfter": "/Date(1994457599000)/",
    "NotBefore": "/Date(1648512000000)/",
    "HasPrivateKey": false,
    "PrivateKey": null,
    "PublicKey": {
      "Key": "System.Security.Cryptography.RSACryptoServiceProvider",
      "Oid": "System.Security.Cryptography.Oid",
      "EncodedKeyValue": "System.Security.Cryptography.AsnEncodedData",
      "EncodedParameters": "System.Security.Cryptography.AsnEncodedData"
    },
    "SerialNumber": "0A7A4A889EC99942900663384D86979D",
    "SubjectName": {
      "Name": "CN=DigiCert Timestamp 2022 - 2, O=\"DigiCert, Inc.\", C=US",
      "Oid": "System.Security.Cryptography.Oid"
    },
    "SignatureAlgorithm": {
      "Value": "1.2.840.113549.1.1.11",
      "FriendlyName": "sha256RSA"
    },
    "Thumbprint": "8508F386515CB3D3077DB6B4B7C07F1B4A5E41DE",
    "Version": 3,
    "Handle": 2027746417248,
    "Issuer": "CN=DigiCert Trusted G4 RSA4096 SHA256 TimeStamping CA, O=\"DigiCert, Inc.\", C=US",
    "Subject": "CN=DigiCert Timestamp 2022 - 2, O=\"DigiCert, Inc.\", C=US"
  },
  "Status": 1,
  "StatusMessage": "A certificate chain could not be built to a trusted root authority"
} {"code":"ERR_UPDATER_INVALID_SIGNATURE","stack":"Error: New version 6.0.1-latest.1660157736010 is not signed by the application owner: publisherNames: Developer ID Application: Xaver Lohmueller (HGC72W36QJ), raw info: {\n  \"SignerCertificate\": {\n    \"FriendlyName\": \"\",\n    \"IssuerName\": {\n      \"Name\": \"C=US, O=Apple Inc., OU=Apple Certification Authority, CN=Developer ID Certification Authority\",\n      \"Oid\": \"System.Security.Cryptography.Oid\"\n    },\n    \"NotAfter\": \"/Date(1801519935000)/\",\n    \"NotBefore\": \"/Date(1659435144000)/\",\n    \"PrivateKey\": null,\n    \"PublicKey\": {\n      \"Key\": \"System.Security.Cryptography.RSACryptoServiceProvider\",\n      \"Oid\": \"System.Security.Cryptography.Oid\",\n      \"EncodedKeyValue\": \"System.Security.Cryptography.AsnEncodedData\",\n      \"EncodedParameters\": \"System.Security.Cryptography.AsnEncodedData\"\n    },\n    \"SerialNumber\": \"25EFD0A4FD1ECD21\",\n    \"SignatureAlgorithm\": {\n      \"Value\": \"1.2.840.113549.1.1.11\",\n      \"FriendlyName\": \"sha256RSA\"\n    },\n    \"Thumbprint\": \"5FFBE30D23D46588F51223E41913C6834E30B52F\",\n    \"Version\": 3,\n    \"Issuer\": \"C=US, O=Apple Inc., OU=Apple Certification Authority, CN=Developer ID Certification Authority\",\n    \"Subject\": \"C=DE, O=Xaver Lohmueller, OU=HGC72W36QJ, CN=Developer ID Application: Xaver Lohmueller (HGC72W36QJ), OID.0.9.2342.19200300.100.1.1=HGC72W36QJ\"\n  },\n  \"TimeStamperCertificate\": {\n    \"Archived\": false,\n    \"Extensions\": [\n      \"System.Security.Cryptography.X509Certificates.X509KeyUsageExtension\",\n      \"System.Security.Cryptography.X509Certificates.X509BasicConstraintsExtension\",\n      \"System.Security.Cryptography.X509Certificates.X509EnhancedKeyUsageExtension\",\n      \"System.Security.Cryptography.X509Certificates.X509Extension\",\n      \"System.Security.Cryptography.X509Certificates.X509Extension\",\n      \"System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierExtension\",\n      \"System.Security.Cryptography.X509Certificates.X509Extension\",\n      \"System.Security.Cryptography.X509Certificates.X509Extension\"\n    ],\n    \"FriendlyName\": \"\",\n    \"IssuerName\": {\n      \"Name\": \"CN=DigiCert Trusted G4 RSA4096 SHA256 TimeStamping CA, O=\\\"DigiCert, Inc.\\\", C=US\",\n      \"Oid\": \"System.Security.Cryptography.Oid\"\n    },\n    \"NotAfter\": \"/Date(1994457599000)/\",\n    \"NotBefore\": \"/Date(1648512000000)/\",\n    \"HasPrivateKey\": false,\n    \"PrivateKey\": null,\n    \"PublicKey\": {\n      \"Key\": \"System.Security.Cryptography.RSACryptoServiceProvider\",\n      \"Oid\": \"System.Security.Cryptography.Oid\",\n      \"EncodedKeyValue\": \"System.Security.Cryptography.AsnEncodedData\",\n      \"EncodedParameters\": \"System.Security.Cryptography.AsnEncodedData\"\n    },\n    \"SerialNumber\": \"0A7A4A889EC99942900663384D86979D\",\n    \"SubjectName\": {\n      \"Name\": \"CN=DigiCert Timestamp 2022 - 2, O=\\\"DigiCert, Inc.\\\", C=US\",\n      \"Oid\": \"System.Security.Cryptography.Oid\"\n    },\n    \"SignatureAlgorithm\": {\n      \"Value\": \"1.2.840.113549.1.1.11\",\n      \"FriendlyName\": \"sha256RSA\"\n    },\n    \"Thumbprint\": \"8508F386515CB3D3077DB6B4B7C07F1B4A5E41DE\",\n    \"Version\": 3,\n    \"Handle\": 2027746417248,\n    \"Issuer\": \"CN=DigiCert Trusted G4 RSA4096 SHA256 TimeStamping CA, O=\\\"DigiCert, Inc.\\\", C=US\",\n    \"Subject\": \"CN=DigiCert Timestamp 2022 - 2, O=\\\"DigiCert, Inc.\\\", C=US\"\n  },\n  \"Status\": 1,\n  \"StatusMessage\": \"A certificate chain could not be built to a trusted root authority\"\n}\n    at Object.newError (C:\\Program Files\\OpenLens\\resources\\app.asar\\node_modules\\electron-updater\\node_modules\\builder-util-runtime\\out\\index.js:47:19)\n    at Object.task (C:\\Program Files\\OpenLens\\resources\\app.asar\\node_modules\\electron-updater\\out\\NsisUpdater.js:39:50)\n    at async NsisUpdater.executeDownload (C:\\Program Files\\OpenLens\\resources\\app.asar\\node_modules\\electron-updater\\out\\AppUpdater.js:516:13)\n    at async C:\\Program Files\\OpenLens\\resources\\app.asar\\static\\build\\main.js:1:295590\n    at async C:\\Program Files\\OpenLens\\resources\\app.asar\\static\\build\\main.js:1:296240\n    at async C:\\Program Files\\OpenLens\\resources\\app.asar\\static\\build\\main.js:1:294880"}
MuhammedKalkan commented 2 years ago

@jkroepke any ideas? İs it not signed correctly for upcoming versions?

horihel commented 2 years ago

mind that this log is from a windows machine

jkroepke commented 2 years ago

@MuhammedKalkan maybe only the app inside the dmg is signed, but not the zip file.

jkroepke commented 2 years ago

What can be also the issue here:

The auto updater check, if the current code signature is equal to the newer version.

The early versions of 6.0.0 war not signed. If you previous used an unsigned version of OpenLens and the auto-update now tried to download a signed version, this can produce a conflict.

Atleast, redownload the latest 6.0.0 version (https://github.com/MuhammedKalkan/OpenLens/releases/tag/v6.0.0) and auto update to 6.0.1 works for me on a M1 mac.

MuhammedKalkan commented 2 years ago

Windows log they say

jkroepke commented 2 years ago

Ah. Windows binaries are signed by an Apple Developer Certificate.

MuhammedKalkan commented 2 years ago

My windows installation did not cause any troubles while updating. Lets see if this PR fixes it

ps68060 commented 2 years ago

I am using Windows 6.0.1-latest.1660157736010 and it's still showing the error when clicking "Relaunch to Update Lens"

MuhammedKalkan commented 2 years ago

That is an expected behaviour since there is a more recent build than that one. You can see build number is diffetent on latest tag. Try to install it and report back what happened as a full log. There are different logs with different issues i think

MuhammedKalkan commented 2 years ago

Please post full logs, the way i see it there is two different logs posted, which may be related to different problems. @horihel Can you try to update again and see it if works

ps68060 commented 2 years ago

I have instaled the latest update but, of course, that means there is no update function to test.

MuhammedKalkan commented 2 years ago

Main problem is to reproduce the error. I got Intel , M1 Macs and windows which all updated flawlessly. If you can find some steps to reproduce error on another host, that would be the most helpful to track down these issues you are experiencing.

mcasviper commented 2 years ago

For ne it works now on MacOS. Thank you

Muhammed Kalkan @.***> schrieb am Fr. 12. Aug. 2022 um 17:14:

Main problem is to reproduce the error. I got Intel , M1 Macs and windows which all updated flawlessly. If you can find some steps to reproduce error, that would be the most helpful to track down this issues you are experiencing.

— Reply to this email directly, view it on GitHub https://github.com/MuhammedKalkan/OpenLens/issues/30#issuecomment-1213222008, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABL545IY64AJREHZFFGIRMLVYZS6TANCNFSM56DKCJ4Q . You are receiving this because you authored the thread.Message ID: @.***>

MuhammedKalkan commented 2 years ago

Great, for those who still have problems please file another issue