iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
616 stars 210 forks source link

[Error: download manifest failed (1) - SSL peer certificate or SSH remote key was not OK] #2997

Closed jchick-bentley closed 2 years ago

jchick-bentley commented 2 years ago

Here are some more details: The code where the error occurs is:

Silent sign-in:

  const { TestUsers, TestUtility } = require('@itwin/oidc-signin-tool')

  // Silent sign-in to Bentley and get access token to run a synchronisation
  const iModelAccessTokenString = await TestUtility.getAccessToken(TestUsers.regular)

The successfully returns a JWT access token.

Run the synchronisation:

  console.log("Running the Synchronisation")
  const fwk = new BridgeRunner(bridgeJobDef, serverArgs);
  const status = await fwk.synchronize();

This is using the following modules:

import { BentleyStatus, Config } from "@bentley/bentleyjs-core"; import { IModelHostConfiguration, IModelHost } from "@bentley/imodeljs-backend"; import { BridgeRunner, BridgeJobDefArgs} from "@bentley/imodel-bridge"; import { ServerArgs } from "@bentley/imodel-bridge/lib/IModelHubUtils"; import { AccessToken, AuthorizedClientRequestContext } from "@bentley/itwin-client"; import { IModelJsConfig } from "@bentley/config-loader/lib/IModelJsConfig";

The module versions are 2.9.18

The only message output is:

DevTools listening on ws://127.0.0.1:54798/devtools/browser/7d5df2ff-4ec7-42aa-8541-b712137d600e [0106/103808.160769:INFO:CONSOLE(358)] "isWebAuthnPlatformAuthenticatorAvailable - false", source: https://ims.bentley.com/as/7Mz6E/resume/as/authorization.ping (358)

[0106/114000.792156:ERROR:command_buffer_proxy_impl.cc(122)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer. [0106/114000.793104:ERROR:command_buffer_proxy_impl.cc(122)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.

[Error: download manifest failed (1) - SSL peer certificate or SSH remote key was not OK]

That is all I have got to go on.

Originally posted by @PeterJBassett in https://github.com/iTwin/itwinjs-core/discussions/2975#discussioncomment-1917149

PeterJBassett commented 2 years ago

Hello @khanaffan and @jchick-bentley - just a note to see if there is any progress on this issue? Is it something to do with ca certificates?

khanaffan commented 2 years ago

Hello @khanaffan and @jchick-bentley - just a note to see if there is any progress on this issue? Is it something to do with ca certificates?

Hi Peter,

Its has been fixed in native addon. You can expect a patch this week for 2.19.x. I will update this thread when its available.

I also see you are using 2.9.18 and patch would be release for 2.19.x. In mean time you might want to upgrade to 2.19.27 (current latest). And once patch is released you can upgrade to next version 2.19.28.

Thanks

khanaffan commented 2 years ago

@PeterJBassett Just to confirm what platform are you using? We found this issue on MacOS. If you see this on Linux you might just need to install or update ca trust certificate depending on distro you are using. The fix we have is exclusively for MacOS.

PeterJBassett commented 2 years ago

Hello @khanaffan Yes I can confirm this is a MacOS problem only. I also have a docker linux deployment and have the update ca certificate fix working ok for that.

Thank you for the info about the patch.

khanaffan commented 2 years ago

@PeterJBassett New version of packages are published. You need to upgrade to 2.19.28 to resolve the issue.

Thanks

PeterJBassett commented 2 years ago

Hello @khanaffan - I can confirm that the bridge integration test now works again running on a Macbook. Thank you for your help.