Problem with viktor-cli

I try to start viktor-cli but I get the following error-msg:
Could not determine the latest version of viktor-cli
Could not clear entities and entity types: Post “https://dev-bvosslamber-heijmans-nl.viktor.ai/api/manifest/reset/”: dial tcp 18.195.23
2.195:443: i/o timeout
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x8a6eaa]

goroutine 1 [running]:
github.com/imroc/req.(*Resp).Response(…)
/builds/viktor-core/viktor-cli/.cache/pkg/mod/github.com/imroc/req@v0.2.4/resp.go:36
viktor-cli/cmd.API.clear({{0xc000186840, 0x17}, {0xc00014e580, 0x3c}, {0x9b7c95, 0x16}}, {0xc0002a0000, 0x41})
/builds/viktor-core/viktor-cli/cmd/api.go:421 +0x26a
viktor-cli/cmd.glob…func5(0xdadf20, {0x9add53, 0x0, 0x0})
/builds/viktor-core/viktor-cli/cmd/clear.go:23 +0x105
github.com/spf13/cobra.(*Command).execute(0xdadf20, {0xe38d40, 0x0, 0x0})
/builds/viktor-core/viktor-cli/.cache/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0xdae6a0)
/builds/viktor-core/viktor-cli/.cache/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fc
github.com/spf13/cobra.(*Command).Execute(…)
/builds/viktor-core/viktor-cli/.cache/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
viktor-cli/cmd.Execute()
/builds/viktor-core/viktor-cli/cmd/root.go:33 +0x25
main.main()
/builds/viktor-core/viktor-cli/main.go:8 +0x17

Is there something wrong on the Viktor platform?

Does the cli show which version if you type viktor-cli.exe version?

Sorry, didn’t read your reply correctly :wink:
It shows the following msg:
bavo6@LAP022036:~/viktor-apps$ ./viktor-cli version
viktor-cli v0.10.0

Could not determine the latest version of viktor-cli

I have the same issue, as does another Heijmans collegue (Ron de Muck). we are all using the WSL2 version of the cli.

I have tried to download a new cli from the Viktor documents. But the coomand ./viktor-cli configure gives the following:

toni3@LAP023629:~/viktor-apps$ ./viktor-cli configure
-bash: ./viktor-cli: Permission denied

I have the same issue, as does another Heijmans collegue (Ron de Muck). we are all using the WSL2 version of the cli.

Does the problem occur for all for the same app, or also for other apps? Does it only hold for the clear command or also other commands? Did the problem arise after updating something (e.g. the app)?

I have tried to download a new cli from the Viktor documents. But the coomand ./viktor-cli configure gives the following:

toni3@LAP023629:~/viktor-apps$ ./viktor-cli configure
-bash: ./viktor-cli: Permission denied

Likely you have to set the permissions as stated here, point 9.

The problems arise with the use of various applications, and also for various commands (clear, update, start, publish)

Hi,

Are you guys working on the same network or VPN? It seems that requests to the platform for some reason cannot be handled correctly, so I am guessing it might be related to the network. Can you try the following:

  1. Run the check-system command on the viktor-cli to see if that completes without any problems
  2. Check DNS resolution by typing host google.com in your ubuntu terminal. If it completes without problems you should see the ip-addresses for google.com

Do these commands execute without any problems?

Regards,

Raoul

Hi Raoul,

This is what I get when running the comands check-system and host

bavo6@LAP022036:~/viktor-apps$ ./viktor-cli check-system
V Docker runs
V Docker using correct container
V Docker access to user directory
V Docker internet access
V Docker access to PyPI
V Docker access to VIKTOR domains
All checks passed!
bavo6@LAP022036:~/viktor-apps$ host google.com
google.com has address 142.250.179.142
google.com has IPv6 address 2a00:1450:400e:801::200e
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
aspmx.l.google.com has address 142.250.153.26
aspmx.l.google.com has IPv6 address 2a00:1450:4013:c04::1a
alt4.aspmx.l.google.com has address 173.194.202.26
alt4.aspmx.l.google.com has IPv6 address 2607:f8b0:400e:c00::1b
alt2.aspmx.l.google.com has address 74.125.200.27
alt2.aspmx.l.google.com has IPv6 address 2404:6800:4003:c00::1b
alt1.aspmx.l.google.com has address 142.250.150.27
alt1.aspmx.l.google.com has IPv6 address 2a00:1450:4010:c1c::1b
alt3.aspmx.l.google.com has address 142.250.157.26
alt3.aspmx.l.google.com has IPv6 address 2404:6800:4008:c13::1b
bavo6@LAP022036:~/viktor-apps$

Hm interesting,

Those seem to be working fine. I also checked in with operations to see if we could see any anomalies on the heijmans environments, but this does not seem to be the case. I guess we will have to do some more digging. Could you try the following command (replace VIKTOR_DEV and VIKTOR_TOKEN with your email address and token and APPNAME with one of your apps):

./viktor-cli run APPNAME -- curl --user VIKTOR_DEV:VIKTOR_TOKEN --request GET https://sys.viktor.ai/api/v1/versions/viktor-cli/

The reply is:
Could not determine the latest version of viktor-cli

Ah yes of course, there is a version check in the cli before it runs the command, so we are not seeing the response of the curl. What is the reply when running the command directly in your terminal: curl --user VIKTOR_DEV:VIKTOR_TOKEN --request GET https://sys.viktor.ai/api/v1/versions/viktor-cli/

now the reply is:
curl: (28) Failed to connect to sys.viktor.ai port 443: Connection timed out

So it seems that some of the viktor domains are not whitelisted on the network you are using. Are you on the company network? If that is the case, can you check with your IT department if they recently changed anything regarding their network policies? You could try switching to a hotspot on your phone to see if the problem persists.

To be able to connect to the platform the following domains should be whitelisted

  • <dev>.viktor.ai
  • api-<dev>.viktor.ai (still used but deprecated)
  • connect.viktor.ai
  • sys.viktor.ai
  • developers.viktor.ai
  • addons.viktor.ai
  • viktor-storage.s3.amazonaws.com

I am working at home, Tom is working at the office. Our connection is protected by GlobalProtect. I will check the domains you mentioned with our IT department. I let you know.

Hi Raoul,
Above mentioned domains aren’t blocked by our firewall. To make things more complicated: one of our colleague is working with the “standard” windows viktor-cli.exe and doesn’t experience these problems. Is it possible to have a teams meeting in order to solve this issue. At the moment I can’t do any work, so that is a bit frustrating.

Is there a fix for this issue? I’m also experiencing the same error currently, on both home wifi, company network and mobile hotspot network.