zowe-cli icon indicating copy to clipboard operation
zowe-cli copied to clipboard

Invalid JSON on zowe zos-files ls

Open pj892031 opened this issue 4 years ago • 2 comments

When I tried call "zowe zos-files ls uss-files /a/plape03" on ca32, it ends with an error:

Command Error: The get request appeared to succeed, but the response was not in the expected format: Unexpected token n JSON at position 18591 Error Details: Unexpected token n JSON at position 18591

Probably this folder contains a special file name or encoding is incorrect

pj892031 avatar Apr 24 '20 14:04 pj892031

I can see 2 things there that look strange:

  1. filename: v¨fT-0-½óT-0-Ö-ET-0-XoT-0-X-v-DQT-0-WÌv-DåT-0-W
  2. filename: " " (empty string)

I guess one of these 2 are causing the error, but it's not my home dir, so I don't want to touch them. My bet is on the first one though 😄

My takeaway here is that we need to look into the way how these filenames with special characters are being treated by z/OSMF when they are returned within the JSON response.

Alexandru-Dumitru avatar Apr 24 '20 14:04 Alexandru-Dumitru

I have now a similar issue:

$ zowe ssh issue cmd "ls"
Command Preparation Failed:
Unexpected token m in JSON at position 0

It was about the wrong ssh profile, it was not related to the specific folder with strangely named files. It was fixed by overriding the profile.

I guess the root cause was updating a password. I have set a new password directly via credentials store in windows instead of overriding all profiles.

pj892031 avatar Oct 21 '21 11:10 pj892031

No further action is planned regarding this issue. If this issue persists, please feel free to reopen the issue and provide further information.

adam-wolfe avatar Sep 20 '23 19:09 adam-wolfe