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

plugin upload return code is not json #76

Open
rusefi opened this issue Jul 16, 2020 · 8 comments
Open

plugin upload return code is not json #76

rusefi opened this issue Jul 16, 2020 · 8 comments
Assignees

Comments

@rusefi
Copy link
Collaborator

rusefi commented Jul 16, 2020

trying to upload attached tunes, something does not go well, http content is not helpful and not JSon :(

IniFileModel: Field label=[] : key=[null]
IniFileModel: Field label=[] : key=[null]
IniFileModel: Dialog key=gppwm4: name=[General Purpose PWM 4]
response=HTTP/1.1 200 OK [Content-Type: text/html; charset=UTF-8, Transfer-Encoding: chunked, Connection: keep-alive, Keep-Alive: timeout=15, Date: Thu, 16 Jul 2020 00:56:54 GMT, Server: Apache, X-Powered-By: PHP/7.3.19] org.apache.http.conn.BasicManagedEntity@1b92091
code 200
responseString=<br />
<b>Notice</b>:  Undefined offset: 2 in <b>/homepages/5/d451478433/htdocs/online/ini.php</b> on line <b>53</b><br />
{"error":["This file already exists in our Database!\r\n"]}
isError true
first Error Unexpected character (<) at position 0.
UploadQueue Re-queueing com.rusefi.tune.xml.Msq@f2c29c
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<msq xmlns="http://www.msefi.com/:msq">
    <page/>
    <page number="0" size="20000">
        <constant name="tsCanId" units="">"0"</constant>
        <constant name="tuneCrcPcVariable" units=""></constant>
        <constant name="wueAfrTargetOffset" units=":1">
	 -1.5
	 -1.4000000000000001
	 -1.1
	 -0.9
@rusefi
Copy link
Collaborator Author

rusefi commented Jul 16, 2020

outbox.zip

@andreika-git
Copy link
Collaborator

andreika-git commented Jul 16, 2020

<versionInfo firmwareInfo="rusEFI+2020" nPages="1" version="5.0"/>

Where is signature? The signature is required to upload the tune.

@rusefi
Copy link
Collaborator Author

rusefi commented Jul 16, 2020

My bad on signature, will fix.

@andreika-git do we want better error handling in php to produce a more readable error message? only if that's not too much trouble

rusefi pushed a commit to rusefi/rusefi that referenced this issue Jul 16, 2020
rusefi pushed a commit to rusefi/rusefi that referenced this issue Jul 16, 2020
@rusefillc
Copy link
Contributor

@stefanst reports

image

I've just changed plugin to actually display the PHP notice let's see what would it be this time

@rusefillc
Copy link
Contributor

let's please explicitly check this condition and return valid JSON error if no .ini file?

image

also I think I see the file in https://rusefi.com/online/ini/rusefi/2020/08/08/mre_f4/ what's going on here @andreika-git ?

@rusefillc
Copy link
Contributor

@stefanst please attach tune to this ticket

@stefanst
Copy link

Offending tune attached
CurrentTune.zip

@andreika-git
Copy link
Collaborator

It's a funny bug we've inherited from the old msqur behavior for MS signatures: "//If there's a decimal, remove any trailing zeros."
Hopefully fixed.

rusefi/msqur@18c547f

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

No branches or pull requests

3 participants