Potential race condition / Bug in v0.5.5
I was attempting to migrate credentials to 1password using an exponential backoff when the request fails. I noticed that this breaks the CLI (or perhaps its local settings) and that this causes data (Login fields/values) from 1 request to be inserted into the item being created on another request. After some number of retries the CLI starts responding with [LOG] 2019/01/22 22:55:38 (ERROR) invalid character '}' after top-level value even for non-writing operations (get & list). Is this a known bug? Are there any examples of scripting the creation of items correctly?
1Password Version: 7.2.4
Extension Version: Not Provided
OS Version: OSX 10.14.2
Sync Type: Not Provided
Comments
-
@tclarkCE I'm afraid I'm not quite sure I understand the problem. You're executing a mass import of items into 1Password using op, and when you encounter an error, you're backing off exponentially. That makes sense.
What I don't understand is
this causes data (Login fields/values) from 1 request to be inserted into the item being created on another request.
This is (from a pure 1Password standpoint) impossible, since item data is encrypted before being uploaded, so it's not possible for parts of the item JSON to "sneak into" the JSON for another item, unless the JSON that's being fed into the command has those fields for some reason. Could it be that the JSON you're passing in has some fields left over from old items? Are you reusing JSON (perhaps from a file) anywhere?
As for the
}
error, this is something I have seen reported before, but I've never been able to reproduce it. If you have a particular item that you can reproduce this with, could you please get the item JSON, strip out any sensitive or identifying information, and post it here? I'd like to try reproducing this.It's possible that if the requests are being made too quickly, you're encountering a known issue involving repeated request IDs (an issue we'll be addressing soon), but I'm not sure why that would cause a JSON error.
Please let me know.
0