ONLYOFFICE / DesktopEditors

An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
https://www.onlyoffice.com
Other
2.76k stars 318 forks source link

Error opening JSON file while checking for updates #1311

Closed BLinus22 closed 1 year ago

BLinus22 commented 1 year ago

This issue is unique.

Operating System

Windows 10 / 8.1 / 7

Version information

7.4.0.163

Expected Behavior

When I click on the "Check for updates" button in the "About" tab in the ONLYOFFICE Desktop Editors it should check, if a newer version is available and show the result. (It already worked in previous versions)

Actual Behavior

When I click on the "Check for updates" button in the "About" tab in the ONLYOFFICE Desktop Editors it shows the error message "Error opening JSON file."

Reproduction Steps

  1. Open the ONLYOFFICE Desktop Editors on your PC
  2. Click on the "About" tab
  3. Click on the "Check for updates" button

Additional information

The error also occurs when opening the ONLYOFFICE Desktop Editors with "Check for updates automatically" enabled. The ONLYOFFICE Desktop Editors is installed on Windows 11. (I selected Windows 10 in the selection for the operating system because Windows 11 is not available.)

Here is a screenshot of the error message: grafik

LuckySpecialist commented 1 year ago

Hi, @BLinus22! Do you have some special environment in your network (domain, proxy etc)?

LuckySpecialist commented 1 year ago

Can you show your system environment variables window?

To do this:

  1. Press Win + R
  2. Paste this command rundll32.exe sysdm.cpl,EditEnvironmentVariables in Open field
  3. Press Enter
BLinus22 commented 1 year ago

Hi @LuckySpecialist,

Do you have some special environment in your network (domain, proxy etc)?

No, I don't think so. Proxy is set to "automatically detect settings" and the pc is not in a domain (it is a private pc with a local user account).

Can you show your system environment variables window?

Yes, here is a screenshot: grafik

By the way, the language of my pc is german, I don't know if that makes a difference.

FirefoxNL commented 1 year ago

I am experiencing the same issue on a Windows Server 2022 terminal server. This server ís joined to a domain with a firewall but outgoing traffic is allowed. I just updated OnlyOffice through the automatic updates, so checking for updates did work prior to updating to 7.4.0.163. My language is in Dutch so it's not bound to a single language.

System variables and configuration below:

systeemvariabelen

systeemvariabelen2

LuckySpecialist commented 1 year ago

Hi, thanks for the info.

Yes, here is a screenshot: grafik

And what about user variables who has an error (in same window above)?

BLinus22 commented 1 year ago

Hi, sorry I forgot about these:

grafik

The blurred area is just my username (without spaces).

LuckySpecialist commented 1 year ago

It looks quite normal, nothing criminal.

Is it possible to test such a scenario?

  1. Open the temporary directory: Win+R > %temp%> Enter
  2. Launch Desktop Editors
  3. Go to the About page
  4. Click Check for updates
  5. When an error message appears, without closing this window, look for a file onlyoffice_<ID>.json in the temp directory
  6. Additionally, you can check for the presence of such a file onlyoffice_<ID>.json in the root of the system disk (C:\ by default)
BLinus22 commented 1 year ago

I have done the steps and found a matching file in the temp directory, I included the entire content of the file in the message. The last changed time of the file was the current time and date. In the root of the system I did not find a matching file.

Here is the content of the file in the temp directory:

{
  "version": "7.4.0.163",
  "date": "Jun 11 06:36 UTC 2023",
  "releaseNotes": {
    "en-EN": "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/changes/changes.html",
    "ru-RU": "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/changes/changes_ru.html"
  },
  "package": {
    "win_64": {
      "url": "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/updates/editors_update_x64.exe",
      "installArguments": "/silent /update",
      "archive": {
        "url": "https://download.onlyoffice.com/install/desktop/editors/windows/distrib/onlyoffice/DesktopEditors_x64.zip",
        "md5": "b388b592e288ab1544bd218548e317c0"
      },
      "iss": {
        "url": "https://download.onlyoffice.com/install/desktop/editors/windows/distrib/onlyoffice/DesktopEditors_x64.exe",
        "md5": "e2e7662d87f3f2fc0eb0208088e79f74",
        "arguments": "/silent /update",
        "maxVersion": "7.3.3"
      },
      "msi": {
        "url": "https://download.onlyoffice.com/install/desktop/editors/windows/distrib/onlyoffice/DesktopEditors_x64.msi",
        "md5": "2f8c7f7afacbe95a2d5898b3f7ccbd4b",
        "arguments": "/qn /norestart",
        "maxVersion": "7.3.3"
      }
    },
    "win_32": {
      "url": "https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/updates/editors_update_x86.exe",
      "installArguments": "/silent /update",
      "archive": {
        "url": "https://download.onlyoffice.com/install/desktop/editors/windows/distrib/onlyoffice/DesktopEditors_x86.zip",
        "md5": "92ef2ee0bc0c20b2ad39650afbf78abb"
      },
      "iss": {
        "url": "https://download.onlyoffice.com/install/desktop/editors/windows/distrib/onlyoffice/DesktopEditors_x86.exe",
        "md5": "5bfa22e846abc20b7d65bfc164cfd548",
        "arguments": "/silent /update",
        "maxVersion": "7.3.3"
      },
      "msi": {
        "url": "https://download.onlyoffice.com/install/desktop/editors/windows/distrib/onlyoffice/DesktopEditors_x86.msi",
        "md5": "285a89af690d40cc4537e12194782cf2",
        "arguments": "/qn /norestart",
        "maxVersion": "7.3.3"
      }
    }
  }
}
LuckySpecialist commented 1 year ago

I have done the steps and found a matching file in the temp directory, I included the entire content of the file in the message. The last changed time of the file was the current time and date. In the root of the system I did not find a matching file.

It's good Now can you check the rights to the temp folder for the user who has the problem?

To do this, you need:

  1. Open the properties window for the temp folder
  2. Go to the Security tab
  3. Select the current user from the list
  4. A list of permissions will be displayed for it in the window below
  5. Additionally, you can also show an extended list of permissions by clicking on the Advanced button
BLinus22 commented 1 year ago

In the Security tab of the temp folder properties is no user list available. In the area for the users is a label with the text "No permissions have been assigned for this object.".

grafik

In the Advanced window is only a info that the current user is the owner of the folder, but the object still has no assigned permissions.

LuckySpecialist commented 1 year ago

In the Security tab of the temp folder properties is no user list available. In the area for the users is a label with the text "No permissions have been assigned for this object.".

Well, now everything has fallen into place. Can you somehow comment on why your user does not have any rights to this folder, although by default it should?

BLinus22 commented 1 year ago

Well, now everything has fallen into place. Can you somehow comment on why your user does not have any rights to this folder, although by default it should?

I've been thinking about it the whole time, but I don't have an answer to the question. I also looked on my other PC (Windows 10) and there no user has a right on the temp folder too. Are you sure that the user should have rights on the folder by default? Because I did not change the rights on the folders on both PCs. Or is there any other case where the rights on the folder change?

Maybe you or someone else can check his PC for the configuration of the rights on the temp folder.

LuckySpecialist commented 1 year ago

Let's try to figure it out together:

  1. What type of account does your user have (local, domain, Microsoft)?
  2. What rights does he have in the system (user or administrator)?

Oh, btw, on all my PCs, the user has rights to this folder, so I have not yet found where to reproduce it. Maybe we can clarify something together.

BLinus22 commented 1 year ago
  1. The user has a local account
  2. The account has administrator rights in the system
LuckySpecialist commented 1 year ago

Hi, @BLinus22! I checked on a couple more PCs, including by a local user without administrator rights in the system. The problem still hasn't been reproduced. All users have read access to the temp folder. We need to understand why the user does not have read permissions on your system. It may have been influenced by some third-party applications. There are no other ideas yet...

Zamzam64 commented 1 year ago

Hi Y'all, Having same issue on a win10 x64 PC, i found out that no permissions at all are granted on %temp% folder. Screenshots are in french. Capture Strangely the other folders in %temp% do have permission as follow. image I then changed the permissions on the %temp% folder as the other folders and it worked.

Question being as said by LuckySpecialist: what made such a difference? I'm gonna check on my other PCs trying to find out the common factor and share the result on this forum.

Anyway thanks a lot for your expertise that helped me to fix this non blocking but annoying issue

LuckySpecialist commented 1 year ago

Hi @Zamzam64, it's good news that the problem was solved, but it's still unclear why the user didn't have access by default.

Zamzam64 commented 1 year ago

Thanks, Unfortunately, after reboot , permissions are removed. It seems machine badsed, since all accounts on said machine have same misbehaviour (local/online and/or admin/not admin Good point is that it may be possible to track what removes permission AT boot level. I keep on investigations.

Le mer. 12 juil. 2023, 15:27, Denis Myshaev @.***> a écrit :

Hi @Zamzam64 https://github.com/Zamzam64, it's good news that the problem was solved, but it's still unclear why the user didn't have access by default.

— Reply to this email directly, view it on GitHub https://github.com/ONLYOFFICE/DesktopEditors/issues/1311#issuecomment-1632529830, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBGOT2AA5MOKIW4JTN5ED23XP2Q3HANCNFSM6AAAAAAZK7OLPM . You are receiving this because you were mentioned.Message ID: @.***>

Zamzam64 commented 1 year ago

Hi Y'all, I ran some further testing and found out that permissions on TEMP folder were removed as well when disconnecting user session and opening it again. Then by de-activating progressively applications from Start-up tab in Task Mngr, I found the culprit: Old program Digiscan from PLUSTEK used for portable scanner ColorPage SF600 from Genius. image

Furthermore --- running this DIGISCAN interactively creates same mess (Permissions on TEMP folder erased)

I did not try yet to set-up compatibility mode as this program back dated 2012, that will be next step and will let you know.

Hope this investigation will help other users to fix their own similar issue.

LuckySpecialist commented 1 year ago

Hi @Zamzam64, do you need administrator rights when running the DIGISCAN application?

Nukethefox commented 1 year ago

Hello everyone, I have the same problem. Windows 11, every time I launch OnlyOffice, the "Error opening JSON file" appears. I searched for my "temp" folder and it has no permissions assigned. I don't have that "digiscan" program. What can I do?

mbelletti commented 1 year ago

Is it possible to test such a scenario?

1. Open the temporary directory: `Win+R` > `%temp% `> `Enter`

Hello.

I've the same problem: Error opening JSON file. I found that onlyoffice_<>_x64.json is in C:\windows\temp instead in %temp% defined in user profile. Cattura

Is there something that I can do?

Thank you

LuckySpecialist commented 1 year ago

Hello @mbelletti, this is interesting. Tell us more information about your system, the type of user account and the version of desktop editors that you use to check for updates?

mbelletti commented 1 year ago

Hello @LuckySpecialist thank you for you reply. That is my setup:

LuckySpecialist commented 1 year ago

Hello @LuckySpecialist thank you for you reply. That is my setup:

  • win 10 pro on x64
  • account is administrator
  • Desktop Editors version 7.4.1.36 (x64 exe)

If an error occurs, are you physically connected to a PC or via a remote desktop?

mbelletti commented 1 year ago

I'm connected via remote desktop

LuckySpecialist commented 1 year ago

At the moment, it will not be possible to update with a remote connection through the service. You can use the installation of the full package for the update. We will include this update scenario in future versions of editors. Thanks for the information.

LuckySpecialist commented 1 year ago

At this stage, we are closing this issue.