Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to parse upload result." #1

Closed
hrxcodes opened this issue Aug 7, 2020 · 3 comments
Closed

"Failed to parse upload result." #1

hrxcodes opened this issue Aug 7, 2020 · 3 comments
Assignees
Labels

Comments

@hrxcodes
Copy link

hrxcodes commented Aug 7, 2020

Hi, I realise this is a bit old but I imagined it would still work, but I'm facing a issue.

I was trying to recompile to debug myself until I noticed the code for the CLI wrapper is not published? Might be that I'm a Go noob as well 😄

The issue I'm facing is this:

srrdb --username=realusername--password=realpassword  --release=full.releasename.here-grouptoo --folder=Sample -u sample-the.release.SxxExx-group.srs

sample-the.release.SxxExx-group.srs: Failed to upload stored file - Failed to parse upload result.

I created a breakpoint on https://github.com/hashworks/go-srrdb-API/blob/v1.1.0/srrdb/srrdb.go#L241

Thread 7 "srrdb" hit Breakpoint 1, github.com/hashworks/go-srrdb-API/srrdb.UploadStoredFile (fp=..., dirname=..., folder=..., jar=0xc0000ff080, ~r4=..., 
    ~r5=...) at /usr/local/go/pkg/mod/github.com/hashworks/go-srrdb-!a!p!i@v1.1.0/srrdb/srrdb.go:241
241	/usr/local/go/pkg/mod/github.com/hashworks/go-srrdb-!a!p!i@v1.1.0/srrdb/srrdb.go: No such file or directory.

(gdb) info locals
w = <optimized out>
bytes = {
  array = 0xc00054e000 "<div style=\"white-space:nowrap;overflow:hidden;text-overflow:ellipsis;\">Add file to full.releasename.here-grouptoo</div>\r\n<form action=\"/release/add/full.releasename.here-grouptoo\" enc"..., len = 621, cap = 1536}
&b = 0xc0000ff110
f = 0xc0005c0150
err = {tab = 0x0, data = 0x0}
fw = <optimized out>
req = 0xc00013a300
client = 0xc00054e000
response = <optimized out>
res = <optimized out>

Did I do something wrong or is there a error in the script? Looks like we are seeing the dialog as if we were trying to add files manually.

Thanks!

@hashworks
Copy link
Owner

hashworks commented Aug 7, 2020

Hi, I realise this is a bit old but I imagined it would still work, but I'm facing a issue.

This being old is not a good excuse, it must be fixed ;)

I was trying to recompile to debug myself until I noticed the code for the CLI wrapper is not published?

It is published here: https://github.com/hashworks/srrdb-Terminal-Client
(Maybe I should like that in the README)

sample-the.release.SxxExx-group.srs: Failed to upload stored file - Failed to parse upload result.

Well, looks like they changed the web interface for that stuff. We'll need to adjust to it.
Thanks for your thorough bug report!

Thing is that I'm going on holiday tomorrow and will be gone for a week, which means I won't have time to fix this before 2020-08-20.

@hashworks hashworks added the bug label Aug 7, 2020
@hashworks hashworks self-assigned this Aug 7, 2020
@hrxcodes
Copy link
Author

hrxcodes commented Aug 7, 2020

This being old is not a good excuse, it must be fixed ;)

Hehe perfect 😄 and yeah would help if that's linked in the README to find it easier. Even though I wonder how I could miss it in your repo list 🤷

In the webbrowser performing the steps manually it does a separate GET request to /release/add/releasename and that gives back:

<div style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">Add file to Releasename-grp</div>
<form action="/release/add/Releasename-grp" enctype="multipart/form-data" id="addform" method="post">
	<p>Folder: <input id="folder" name="folder" type="text" style="height:24px" />/(<a class="get-content" href="#">Sample</a>, <a class="get-content" href="#">Proof</a>, <a class="get-content" href="#">Subs</a> or <a class="get-content" href="#">something else?</a>)<br />
	<input id="file" name="file" type="file" /><input type="hidden" name="add" /></p>
</form>

Which seems to be what is built in the API package folder, file, add, so I'm not really seeing why we would get the "add file" dialog back on a POST to /release/add/releasename

Works fine when I try to replicate the same in Postman.

No stress, enjoy 🌞

@hashworks
Copy link
Owner

Hi, please try out srrdb-terminal-client v1.1.6. Should be fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants