trolster / urcli

CLI tool for the Udacity Reviews API
MIT License
100 stars 23 forks source link

urcli assign UI not showing #109

Closed Shreeyak closed 7 years ago

Shreeyak commented 7 years ago

Guidelines to submit an issue

I'm opening this issue because:

What's going wrong?

urcli is not showing the UI. The screen is blank. The script still seems to be running and responds to the key presses. Pressing esc shows the exiting dialog, pressing o shows the options.

I am running this on a digitalocean server, with tmux. It used to work just fine. Now it doesn't. I do not remember making any changes. I have tried:

How can the urcli team reproduce the problem?

No idea. I just run urcli assign all --push. It used to display the UI properly earlier, now it doesn't! I do wish I could remember if I changed something. This still works properly on my personal PC, just not on the digital ocean server that I access from SSH.

supporting information:

Pictures

config.json file

{
  "assign": {
    "flags": {
      "ui": true
    },
    "scripts": {},
    "default": [
      "298"
    ]
  },
  "token": "<removed for safety>$
  "tokenAge": "2017-10-30T06:45:34.202Z",
  "languages": [
    "en-us"
  ],
  "pushbulletToken": "<removed for safety>",
  "startDate": "2017-06-01",
  "certs": {
    "298": {
      "name": "Search and Sample Return",
      "price": "24.65"
    },
    "305": {
      "name": "Robotic Arm: Pick & Place",
      "price": "24.65"
    },
    "325": {
      "name": "3D Perception",
      "price": "22.1"
    },
    "348": {
      "name": "Follow Me",
      "price": "24.65"
    }
  }
}
Shreeyak commented 7 years ago

UPDATE: while pasting the config.json file here, I noticed this:

"scripts": {},
    "default": [
      "298"
    ]

Which is weird, because I just uninstalled and reinstalled urcli.

So I removed the config file: mv config.json ~config.json and re-ran urcli setup. The UI now displays properly!!

Here is my new config.json file:

{
  "assign": {
    "flags": {},
    "scripts": {},
    "default": []
  },
  "token": "<removed>$
  "tokenAge": "2017-10-30T07:20:15.863Z",
  "languages": [
    "en-us"
  ],
  "pushbulletToken": "<removed>",
  "startDate": "2017-06-01",
  "certs": {
    "298": {
      "name": "Search and Sample Return",
      "price": "24.65"
    },
    "305": {
... and so on

Bug and solution found

So it seems that urcli setup AND urcli assign config did not update those starting few terms correctly:

"assign": {
    "flags": {},
    "scripts": {},
    "default": []
  },

To check this, I ran urcli assign config twice. I added default projects and lo, behold! The config file changed:

"assign": {
    "flags": {
      "ui": true
    },
    "scripts": {},
    "default": [
      "298",
      "305",
      "325",
      "348"
    ]

Now when I ran urcli assign all --push, it showed the same behaviour as before, UI was blank!

Conclusion

Notice that a new flag has been added: "ui": true. To see if this is the cause of the problem, I removed the config.json file again and re-ran urcli setup. In the new config.json file, I simply added this flag to see if it causes an issue. It does. I'm going to close this issue and post a new one detailing this bug