screepers / screeps-multimeter

The most useful tool on your screeps workbench.
MIT License
89 stars 28 forks source link

Cannot login to private server, throws Error: Not Authorized #45

Closed barthogenes closed 3 years ago

barthogenes commented 3 years ago

When I start the private server via the Steam UI, call setPassword("BBCorn", "1234") and then try to start multimeter using multimeter -s private, I get Error: Not Authorized.

My .screeps.yaml:

servers:
  main:
    host: screeps.com
    secure: true
    token: '00000000-0a0a-0a00-000a-a0000a0000a0'
  ptr:
    host: screeps.com
    secure: true
    path: '/ptr'
    token: '00000000-0a0a-0a00-000a-a0000a0000a0'
  season:
    host: screeps.com
    secure: true
    path: '/season'
    token: '00000000-0a0a-0a00-000a-a0000a0000a0'
  private:
    host: 127.0.0.1
    port: 21025
    secure: false
    username: BBCorn
    password: 1234
  configs:
  multimeter:
    plugins: []
    aliases: {}
    logFilename: 'multimeter.log'

It does work if I make the same request with a REST Client: image

Am I doing something wrong?

AlinaNova21 commented 3 years ago

Try quoting the password in your config file, since its all numeric, its likely being read as a number rather than a string, which might cause it to fail auth

barthogenes commented 3 years ago

Putting the password between quotes was indeed the solution. Thank you!