Homepage    |    GitHub    |    API    |    FAQ

Fresh install error 400

I am running a fresh install of Beta 2.06 i have it all setup with a user in the web ui.
in the client i keep getting this result when trying to sync
The usr and pw are correct but i cant get past this

Error. Please check that URL, username, password, etc. are correct and that the sync target is accessible. The reported error was:
Unknown error: <!DOCTYPE html> <html> <head> <title>Runtime Error</title> <meta name="viewport" content="width=device-width" /> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } @media screen and (max-width: 639px) { pre { width: 440px; o (Code 400)

in the log it doesnt seem to show anything other than the client created a file called testing.txt which i can see in the web ui
image

2021-06-10 12:40:58: App: POST /api/sessions (139ms)
2021-06-10 12:40:58: App: PUT /api/items/root:/testing.txt:/content (18ms)
2021-06-10 12:42:25: App: POST /api/sessions (280ms)
2021-06-10 12:42:25: App: PUT /api/items/root:/testing.txt:/content (11ms)
2021-06-10 12:43:09: App: GET /api/share_users (2ms)
2021-06-10 12:43:09: App: GET /api/shares (2ms)

In the console you might see more info, including a curl command to easily replicate the issue. https://joplinapp.org/debugging

Thank you @laurent, i think i have it figured out.
IIS hates everything, the colon in the query was causing it to error out

curl -v -X GET -H "X-API-AUTH: XXXXXXXXXXXXXXXXXXXX" 'https://joplin.XXXXXX.biz/api/items/root:/info.json:/content'

So i had to change my app pool to .net 2.0 instead of the default 4.0 and allow double escaping

image

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <security> 
           <requestFiltering allowDoubleEscaping="true" /> 
        </security>
        <rewrite>
            <rules>
                <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Rewrite" url="http://10.2.0.6:22300/{R:1}" />
                </rule>
            </rules>
        </rewrite>
        <httpErrors errorMode="DetailedLocalOnly" />
    </system.webServer>
</configuration>
1 Like