Talk:Parsoid

Jump to navigation Jump to search

About this board

Error loading data from server: 500: apierror-visualeditor-docserver-http: HTTP 500. Would you like to retry?

5
NicolasEcarnot (talkcontribs)

Hello,

Here is my setup :

- Debian 10

- Mediawiki 1.31.4

- VisualEditor 0.1.0

- Parsoid 0.10.0

I installed the above using packages, and using short URLs with the following setup :

LocalSettings.php :

$wgScriptPath = "";

$wgArticlePath = "/wiki/$1";


Then about Parsoid binding with VisualEditor :

$wgVirtualRestConfig['modules']['parsoid'] = array(

   'url' => 'http://wiki.example.lan:8142',

   'domain' => 'mydomain'

);


In /etc/mediawiki/parsoid/config.yaml, I've set up this :

mwApis:

       -

         uri: 'http://wiki.example.lan/wiki/api.php'

         domain: 'mydomain'


When I'm trying to edit an article with VisualEditor, I get the error described in the subject :

Error loading data from server: 500: apierror-visualeditor-docserver-http: HTTP 500. Would you like to retry?


In /var/log/parsoid/parsoid.log, I see :

"Config Request failure for \"http://wiki.example.lan/wiki/api.php\": 404","time":"2019-12-09T15:11:21.586Z","v":0}


Using curl, I can ask simple things to Parsoid like its version, but that's all.

The wiki is open (no auth restriction).

Obviously, I've read 72% of all internet web pages and tried tons of settings before asking my question here, but now, I don't know what to check.

May you help me please?

Arlolra (talkcontribs)
NicolasEcarnot (talkcontribs)

Hello Arlolra,

As I'm using short URLs, my wiki is serving its page like the page you're reading at present :

<code>https://www.mediawiki.org/wiki/Topic:Vcmzn6wl4la0fd69}</code> so in my case :

<code>http://wiki.example.lan/wiki/}</code>.

This URLs shortening is working for articles, but I agree that in the case of special files like load.php, api.php, something has to be looked at. Though, so far, except on this Parsoid issue, things seem to be working nicely.


You wrote : Usually that's something like, http://wiki.example.lan/w/api.php or http://wiki.example.lan/api.php

1 : Using http://wiki.example.lan/w/api.php, is very similar to http://wiki.example.lan/w/api.php and this only deals with how one shortens the URL in the config file.

2 : But using http://wiki.example.lan/api.php does not seem possible to me as I'm serving the mediawiki folder through an apache Alias directive (I did not choose this, this came from the Debian package. About Short URLs, other people here wrote one had to choose between aliases and rewriting. The Debian package maintainers have chosen aliases.)

I'd be very glad to have a look at the setup of www.mediawiki.org setup files, especially how they shorten their URLs.

Arlolra (talkcontribs)
2003:C6:4F25:E6E0:285D:1D34:EF27:E455 (talkcontribs)

Hi,

are you using the heroku app?

1) Make sure that no htpasswd is set up in your /w folder. I realized that the heroku app is not working with a password protected ftp folder.

2) Be careful where you set your root directory in your website hosting app. I realized that it worked very well after I set the /w folder under public_html

Reply to "Error loading data from server: 500: apierror-visualeditor-docserver-http: HTTP 500. Would you like to retry?"
D8sychain (talkcontribs)

Looking for advice as to where to continue sorting out this issue. It seems to me that API requests timeout and fail to respond in time, but then eventually responds and Parsoid process everything, but by that point in time the UI has already responded with an error. It doesn't occur every time, but most times. Pages with templates never work.

UI popup message:

Error loading data from server: Could not connect to the server. Would you like to retry?

Logs:

- - 21/Dec/2019:13:08:25 +0000 "GET /Test" 200

- - 21/Dec/2019:13:08:27 +0000 "GET /load.php" 304

- - 21/Dec/2019:13:08:27 +0000 "GET /load.php" 200

- - 21/Dec/2019:13:08:29 +0000 "GET /load.php" 200

- - 21/Dec/2019:13:08:30 +0000 "GET /api.php" 200

{"name":"parsoid","hostname":"30095a5f2051","pid":412,"level":30,"logType":"info","wiki":"wiki$0","title":"Test","oldId":null,"reqId":"36e8196ad5bcc4204e61e57a","userAgent":"VisualEditor-MediaWiki/1.33.1","msg":"started wt2html","longMsg":"started wt2html","levelPath":"info","time":"2019-12-21T13:08:33.047Z","v":0}

{"name":"parsoid","hostname":"30095a5f2051","pid":412,"level":40,"logType":"warn/api/esockettimedout","wiki":"wiki$0","title":"Test","oldId":"34","reqId":"36e8196ad5bcc4204e61e57a","userAgent":"VisualEditor-MediaWiki/1.33.1","msg":"Failed API request, {\"error\":{\"code\":\"ESOCKETTIMEDOUT\",\"connect\":false},\"retries-remaining\":1}","longMsg":"Failed API request,\n{\"error\":{\"code\":\"ESOCKETTIMEDOUT\",\"connect\":false},\"retries-remaining\":1}","levelPath":"warn/api/esockettimedout","time":"2019-12-21T13:09:13.054Z","v":0}

{"name":"parsoid","hostname":"30095a5f2051","pid":412,"level":40,"logType":"warn/api/esockettimedout","wiki":"wiki$0","title":"Test","oldId":"34","reqId":"36e8196ad5bcc4204e61e57a","userAgent":"VisualEditor-MediaWiki/1.33.1","msg":"Failed API request, {\"error\":{\"code\":\"ESOCKETTIMEDOUT\",\"connect\":false},\"retries-remaining\":1}","longMsg":"Failed API request,\n{\"error\":{\"code\":\"ESOCKETTIMEDOUT\",\"connect\":false},\"retries-remaining\":1}","levelPath":"warn/api/esockettimedout","time":"2019-12-21T13:09:13.054Z","v":0}

- - 21/Dec/2019:13:08:30 +0000 "POST /api.php" 500

- - 21/Dec/2019:13:08:32 +0000 "GET /api.php" 200

- - 21/Dec/2019:13:08:33 +0000 "GET /api.php" 200

- - 21/Dec/2019:13:09:13 +0000 "GET /api.php" 200

[DEBUG] | AsyncTokenTransformManager.setFrame []

[DEBUG] | SyncTokenTransformManager.onChunk, input: ["test"]

[DEBUG] | SyncTokenTransformManager.onChunk: emitting ["test"]

[DEBUG] | maybeSyncReturn transforming c-0 {"tokens":["test"]}

[DEBUG] | firstAccum sync c-0 ["test"]

[DEBUG] | AsyncTokenTransformManager onChunk sync ["test"]

[DEBUG] | emitting

[DEBUG] | SyncTokenTransformManager.onChunk, input: ["test"]

0-[PRE-DBG] | saved : []

0-[PRE-DBG] | ----> ["test"]

[DEBUG] | SyncTokenTransformManager.onChunk: emitting []

[DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]

[DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]

[DEBUG] | maybeSyncReturn transforming c-1 {"tokens":[{"type":"NlTk","dataAttribs":{"tsr":[4,5]}}]}

[DEBUG] | maybeSyncReturn transforming c-1 {"tokens":[{"type":"NlTk","dataAttribs":{"tsr":[5,6]}}]}

[DEBUG] | maybeSyncReturn transforming c-1 {"tokens":["test 2"]}

[DEBUG] | firstAccum sync c-1 [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]

[DEBUG] | AsyncTokenTransformManager onChunk sync [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]

[DEBUG] | emitting

[DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]

0-[PRE-DBG] | saved : []

0-[PRE-DBG] | ----> [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}}]

0-[PRE-DBG] | saved : []

0-[PRE-DBG] | ----> [{"type":"NlTk","dataAttribs":{"tsr":[5,6]}}]

0-[PRE-DBG] | saved : []

0-[PRE-DBG] | ----> ["test 2"]

[DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"TagTk","name":"p","attribs":[],"dataAttribs":{}},"test",{"type":"EndTagTk","name":"p","attribs":[],"dataAttribs":{}},{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}}]

0-[HTML-DBG] | Inserting shadow meta for p

0-[HTML-DBG] | Inserting shadow meta for p

[DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"EOFTk"}]

[DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"EOFTk"}]

[DEBUG] | maybeSyncReturn transforming c-2 {"tokens":[{"type":"EOFTk"}]}

[DEBUG] | maybeSyncReturn transforming c-2 {"tokens":[{"type":"EOFTk"}]}

[DEBUG] | firstAccum sync c-2 [{"type":"EOFTk"}]

[DEBUG] | AsyncTokenTransformManager onChunk sync [{"type":"EOFTk"}]

[DEBUG] | emitting

[DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"EOFTk"}]

[DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"TagTk","name":"p","attribs":[],"dataAttribs":{}},"test 2",{"type":"EndTagTk","name":"p","attribs":[],"dataAttribs":{}},{"type":"EOFTk"}]

0-[HTML-DBG] | Inserting shadow meta for p

0-[HTML-DBG] | Inserting shadow meta for p

{"name":"parsoid","hostname":"30095a5f2051","pid":412,"level":30,"logType":"info","wiki":"wiki$0","title":"Test","oldId":34,"reqId":"36e8196ad5bcc4204e61e57a","userAgent":"VisualEditor-MediaWiki/1.33.1","msg":"completed wt2html in 60875.93622291088ms","longMsg":"completed wt2html in 60875.93622291088ms","levelPath":"info","time":"2019-12-21T13:09:33.909Z","v":0}

- - 21/Dec/2019:13:08:30 +0000 "GET /api.php" 200

D8sychain (talkcontribs)

Successful load log:

- - 21/Dec/2019:13:46:13 +0000 "GET /Test" 200

- - 21/Dec/2019:13:46:14 +0000 "GET /load.php" 304

- - 21/Dec/2019:13:46:14 +0000 "GET /load.php" 304

- - 21/Dec/2019:13:46:14 +0000 "GET /load.php" 304

- - 21/Dec/2019:13:46:17 +0000 "GET /load.php" 200

- - 21/Dec/2019:13:46:24 +0000 "GET /api.php" 200

- - 21/Dec/2019:13:46:24 +0000 "GET /api.php" 200

{"name":"parsoid","hostname":"30095a5f2051","pid":423,"level":30,"logType":"info","wiki":"wiki$0","title":"Test","oldId":null,"reqId":"fecf319b412cafc20822db0f","userAgent":"VisualEditor-MediaWiki/1.33.1","msg":"started wt2html","longMsg":"started wt2html","levelPath":"info","time":"2019-12-21T13:46:25.244Z","v":0}

[DEBUG] | AsyncTokenTransformManager.setFrame []

[DEBUG] | SyncTokenTransformManager.onChunk, input: ["test"]

[DEBUG] | SyncTokenTransformManager.onChunk: emitting ["test"]

[DEBUG] | maybeSyncReturn transforming c-0 {"tokens":["test"]}

[DEBUG] | firstAccum sync c-0 ["test"]

[DEBUG] | AsyncTokenTransformManager onChunk sync ["test"]

[DEBUG] | emitting

[DEBUG] | SyncTokenTransformManager.onChunk, input: ["test"]

0-[PRE-DBG] | saved : []

0-[PRE-DBG] | ----> ["test"]

[DEBUG] | SyncTokenTransformManager.onChunk: emitting []

[DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]

[DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]

[DEBUG] | maybeSyncReturn transforming c-1 {"tokens":[{"type":"NlTk","dataAttribs":{"tsr":[4,5]}}]}

[DEBUG] | maybeSyncReturn transforming c-1 {"tokens":[{"type":"NlTk","dataAttribs":{"tsr":[5,6]}}]}

[DEBUG] | maybeSyncReturn transforming c-1 {"tokens":["test 2"]}

[DEBUG] | firstAccum sync c-1 [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]

[DEBUG] | AsyncTokenTransformManager onChunk sync [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]

[DEBUG] | emitting

[DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}},"test 2"]

0-[PRE-DBG] | saved : []

0-[PRE-DBG] | ----> [{"type":"NlTk","dataAttribs":{"tsr":[4,5]}}]

0-[PRE-DBG] | saved : []

0-[PRE-DBG] | ----> [{"type":"NlTk","dataAttribs":{"tsr":[5,6]}}]

0-[PRE-DBG] | saved : []

0-[PRE-DBG] | ----> ["test 2"]

[DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"TagTk","name":"p","attribs":[],"dataAttribs":{}},"test",{"type":"EndTagTk","name":"p","attribs":[],"dataAttribs":{}},{"type":"NlTk","dataAttribs":{"tsr":[4,5]}},{"type":"NlTk","dataAttribs":{"tsr":[5,6]}}]

0-[HTML-DBG] | Inserting shadow meta for p

0-[HTML-DBG] | Inserting shadow meta for p

[DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"EOFTk"}]

[DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"EOFTk"}]

[DEBUG] | maybeSyncReturn transforming c-2 {"tokens":[{"type":"EOFTk"}]}

[DEBUG] | maybeSyncReturn transforming c-2 {"tokens":[{"type":"EOFTk"}]}

[DEBUG] | firstAccum sync c-2 [{"type":"EOFTk"}]

[DEBUG] | AsyncTokenTransformManager onChunk sync [{"type":"EOFTk"}]

[DEBUG] | emitting

[DEBUG] | SyncTokenTransformManager.onChunk, input: [{"type":"EOFTk"}]

[DEBUG] | SyncTokenTransformManager.onChunk: emitting [{"type":"TagTk","name":"p","attribs":[],"dataAttribs":{}},"test 2",{"type":"EndTagTk","name":"p","attribs":[],"dataAttribs":{}},{"type":"EOFTk"}]

0-[HTML-DBG] | Inserting shadow meta for p

0-[HTML-DBG] | Inserting shadow meta for p

{"name":"parsoid","hostname":"30095a5f2051","pid":423,"level":30,"logType":"info","wiki":"wiki$0","title":"Test","oldId":34,"reqId":"fecf319b412cafc20822db0f","userAgent":"VisualEditor-MediaWiki/1.33.1","msg":"completed wt2html in 1136.6053849458694ms","longMsg":"completed wt2html in 1136.6053849458694ms","levelPath":"info","time":"2019-12-21T13:46:26.367Z","v":0}

- - 21/Dec/2019:13:46:23 +0000 "GET /api.php" 200

- - 21/Dec/2019:13:46:23 +0000 "GET /load.php" 200

- - 21/Dec/2019:13:46:25 +0000 "GET /api.php" 200

- - 21/Dec/2019:13:46:26 +0000 "GET /Test" 200

- - 21/Dec/2019:13:46:26 +0000 "POST /api.php" 200

D8sychain (talkcontribs)

I did not figure out the exact cause, but I switched from SQLite database to MySQL database and the issue went away.

Reply to "Timeout issues"

The Parsoid Guide needs updating and better formatting

5
Thedonquixotic (talkcontribs)

Hi, I'm new to using Mediawiki but I just wanted to comment and say that I think the Parsoid guide is poorly written and needs some serious improvements. It's constantly sidetracked by notes on obsolete options, or alternative installation issues etc, which results in a very confusing stream of information to parse.

I was unable to install Parsoid correctly following the official guide but I found this one much easier to follow: https://www.howtoforge.com/tutorial/how-to-install-visualeditor-for-mediawiki-on-centos-7/

While the one linked is only for a specific OS and server type, I think it is a better example of how a Parsoid installation tutorial should be structured. The current one is very muddy and the structure of it is not consistent, at least to the eyes of a newbie like me. I am a newbie, but I think I have a decent understanding of technical information writing and the current shape of the article is not a good example of that.

Arlolra (talkcontribs)

I'm sorry for the assessment of the documentation. It is community maintained so there's an opportunity for you to contribute improvements, if possible.

Setting up Parsoid has been a thorn in many a MediaWiki developers side and is one motivating factor in porting Parsoid from JavaScript to PHP, to be included in core.

Hopefully that will ease the burden of many peoples' setup moving forward.

I appreciate the feedback.

MavropaliasG (talkcontribs)

Hi @Arlolra is there a chance you could tell me when approximately the port will finish? I know it's very difficult to say, but if you had to take a wild guess, would you say it's going to be like ~6 months or more like 2 years? Thanks

Arlolra (talkcontribs)

The port is currently in process of being deployed to WMF's production cluster so, for all extents and purposes, it's done.

D8sychain (talkcontribs)

I think that is wonderful news. Is there a good place to follow along with updates on its development?

Reply to "The Parsoid Guide needs updating and better formatting"

curl: (7) Failed to connect to localhost port 8142: Connection refused

5
210.195.7.193 (talkcontribs)

Hi, been trying to install parsoid for days. still got this error. anyone can help?


OS: Ubuntu 18.04

PHP: 7.3

Web Server: Nginx

Nodejs: 12.5.0

service parsoid status replied:

parsoid.service - LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back

  Loaded: loaded (/etc/init.d/parsoid; generated)

  Active: active (running) since Mon 2019-07-01 14:20:30 UTC; 10min ago

    Docs: man:systemd-sysv-generator(8)

  Process: 4557 ExecStop=/etc/init.d/parsoid stop (code=exited, status=0/SUCCESS)

  Process: 4565 ExecStart=/etc/init.d/parsoid start (code=exited, status=0/SUCCESS)

    Tasks: 12 (limit: 2344)

  CGroup: /system.slice/parsoid.service

          ├─4583 /bin/sh -c /usr/bin/nodejs /usr/lib/parsoid/src/bin/server.js -c /etc/mediawiki/parsoid/config.yaml >> /var/log/parsoid/parsoid.log 2>&1

          └─4585 /usr/bin/nodejs /usr/lib/parsoid/src/bin/server.js -c /etc/mediawiki/parsoid/config.yaml

Jul 01 14:20:25 homestead systemd[1]: Stopped LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back.

Jul 01 14:20:25 homestead systemd[1]: Starting LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back...

Jul 01 14:20:25 homestead parsoid[4565]: Started Parsoid server on port 8142

Jul 01 14:20:30 homestead systemd[1]: Started LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back.


But still the error was displayed when trying to curl to localhost:8142


Please help. Thanks


210.195.7.193 (talkcontribs)

/var/log/parsoid/parsoid.log


{"name":"parsoid","hostname":"homestead","pid":5784,"level":30,"levelPath":"info/service-runner","msg":"master(5784) initializing 1 workers","time":"2019-07-01T14:43:04.066Z","v":0}

{"name":"parsoid","hostname":"homestead","pid":5796,"level":60,"code":"MODULE_NOT_FOUND","requireStack":["/usr/lib/parsoid/node_modules/service-runner/lib/base_service.js","/usr/lib/parsoid/node_modules/service-runner/lib/master.js","/usr/lib/parsoid/node_modules/service-runner/service-runner.js"],"moduleName":"../src/lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Cannot find module '../src/lib/index.js'\nRequire stack:\n- /usr/lib/parsoid/node_modules/service-runner/lib/base_service.js\n- /usr/lib/parsoid/node_modules/service-runner/lib/master.js\n- /usr/lib/parsoid/node_modules/service-runner/service-runner.js","time":"2019-07-01T14:43:04.338Z","v":0}

{"name":"parsoid","hostname":"homestead","pid":5784,"level":40,"message":"first worker died during startup, continue startup","worker_pid":5796,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2019-07-01T14:43:05.358Z","v":0}

Arlolra (talkcontribs)

Is the file "/usr/lib/parsoid/src/lib/index.js" present?

Arlolra (talkcontribs)

Most likely the module in /etc/mediawiki/parsoid/config.yaml needs to be updated to point to the right place.

31.166.159.122 (talkcontribs)

arlolra is right

edit config.yaml

point module: /usr/lib/parsoid/src/lib/index.js

thats it :)


Reply to "curl: (7) Failed to connect to localhost port 8142: Connection refused"
Nickm84 (talkcontribs)

Has anybody been able to configure and run parsoid on a wikifarm that's sharing resources? I'm following the steps outlined in "the big switch" section which i've been able to get setup successfully. Manual:Wiki family


The problem is when editing pages with similar titles, for instance the Main_Page. When you edit the page from one wiki site, the other sites will show the same edited content from wiki1 when you edit their pages. I'm guessing this is because they're all using the same API. Is there any way around this?

Reply to "Wikifarm issues with parsoid"

"Did not find page revisions for" error. How can I solve this?

1
Summary by Parkyh1974

Sorry. After I make another page in english and make some change, it shows normally. So I think that's some other problem like

Parkyh1974 (talkcontribs)

I'm struggling to setup visualeditor.

I think I've set up parsoid almost done.

But when I try this as troubleshooting guide, it reponds this error.


curl -L http://localhost:8142/localhost/v3/page/html/Main_Page/

Did not find page revisions for Main_Page

What should I do?

Parsoid with AuthRemoteuser (private wiki)

8
Summary by Arlolra
2A02:A03F:48B8:BA00:FCD4:94B6:A36D:4719 (talkcontribs)

We have Kerberos enabled for apache which provides for every page the user. However as parsoid was not providing these credentials when connecting to http://localhost/wiki/api.php , the create/edit would fail.

We thought solving it by excluding the specific url http://localhost/wiki/api.php from authentication. However we now have the strange problem that when browsing to a page, the user is clearly logged in in the upper right corner, however when he clicks on edit, the visual editor complains about the user being 'anonymous' and consequently in the history only the ip address is logged instead of the username.

I have no clear understanding how parsoid provides the username to the api.php endpoint. What could be the issue here?

Arlolra (talkcontribs)
Mishter Jingles (talkcontribs)

Thanks for your answer.

I tried both links.

If I enable authentication in apache for http://localhost/wiki/api.php, then parsoid always gives :

"401 Unauthorized This server could not verify that you\nare authorized to access the document\nrequested.  Either you supplied the wrong\ncredentials (e.g., bad password), or your\nbrowser doesn't understand how to supply\nthe credentials required"

If I disable authentication in apache, parsoid "works" but the user is still 'anonymous'

Arlolra (talkcontribs)

After enabling authentication, you'd need to forward cookies. Did you try that?

Mszicsu (talkcontribs)
Starws (talkcontribs)

Hello!

Same configuration as Mishter Jingles

After enabling authentication, you'd need to forward cookies. Did you try that? - Yup!

Still ip address instead of the username while edit any page.


Apache:

<Location /mediawiki/api.php>

        Satisfy Any

</Location>


LocalSettings.php:

...

$wgGroupPermissions['*']['read'] = true;

$wgGroupPermissions['*']['edit'] = true;

...

PS:

Also tried with $wgSessionsInObjectCache = true; and $wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;

Parsoid and mediawiki hosted on same server.


PSS:

Next configuration doesn't work (read permissions error):


LocalSettings.php:

...

$wgGroupPermissions['*']['read'] = false;

$wgGroupPermissions['*']['edit'] = false;

...

if ( !isset( $_SERVER['REMOTE_ADDR'] ) OR $_SERVER['REMOTE_ADDR'] == '127.0.0.1' ) {

$wgGroupPermissions['*']['read'] = true;

$wgGroupPermissions['*']['edit'] = true;

}

#NetworkAuth

require_once "$IP/extensions/NetworkAuth/NetworkAuth.php";

$wgNetworkAuthUsers[] = [

        'iprange' => [ '127.0.0.1' ],

        'user'    => 'parsoid'

];

Arlolra (talkcontribs)
Meowoclock (talkcontribs)

Thanks all above for the help, I just wanted to chime in myself because this page was in top google results while troubleshooting.


I was setting up a similar config, for myself (just a intranet wiki using apache basic http auth to restrict a "open" wiki.)

I was struggling but eventually realized that


1. my apache needed to be configured as:


Apache:


<Location /mediawiki/api.php>

        Satisfy Any

</Location>


and


2.(as Arlolra mentioned) I needed to forward cookies.


Reply to "Parsoid with AuthRemoteuser (private wiki)"
216.255.253.87 (talkcontribs)

Protip: When setting the config for multiple wikis if you get a duplicate key error it is essential that a line with:

- #

is between each of the uri/domain combinations under mwApis in config.yaml

Reply to "Multiple wikis"

HTTP 406 error when editing existing pages using Parsoid version 0.10.0

5
Hoefsldyla (talkcontribs)

Mediawiki 1.31.1

Parsoid 0.10.0

VisualEditor 1.31 as of 11/01/2019

Latest RESTBase as of 11/01/2019

NodeJS v8.10.0


Parsoid works fine by itself but if i try set it up in combination with RESTBase for the ability to switch from source code to visual editor

I get HTTP 406. (Failed to transform content, requested_version:1.6.0, existing_version:2.0.0)

It worked fine before I upgraded Parsoid from 0.9.0.

This post was hidden by Hoefsldyla (history)
Rajeshrajesh.35 (talkcontribs)

I am still getting error "apierror-visualeditor-docserver-http","info":"HTTP 406"

Using these configs:

OS : GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)

NAME="Red Hat Enterprise Linux Server"

VERSION="7.6 (Maipo)"

MediaWiki 1.31.1

VisualEditor 0.1.0 (6854ea0)22:33, 5 November 2018

"parsoid" : 0.10.0+git

Parso log:

"name": "parsoid",

"hostname": "ashsd.xxx.com",

"pid": 19229,

"level": 60,

"logType": "fatal/request",

"wiki": "Wiki2",

"title": "Bot",

"oldId": null,

"reqId": null,

"userAgent": "VisualEditor-MediaWiki/1.31.1",

"msg": "Not acceptable.\ntext/html; charset=utf-8; profile=\"\"\ntext/html; charset=utf-8; profile=\"/HTML/999.0.0\"\n",

"stack": "",

"httpStatus": 406,

"longMsg": "Not acceptable.\ntext/html; charset=utf-8; profile=\""\ntext/html; charset=utf-8; profile=\"/HTML/999.0.0\"\n",

"levelPath": "fatal/request",

"time": "2019-06-19T09:00:58.714Z",

"v": 0

Arlolra (talkcontribs)
Rajeshrajesh.35 (talkcontribs)

Thanks @Arlolra, i will try it once

Reply to "HTTP 406 error when editing existing pages using Parsoid version 0.10.0"

Rant: Managing parsoid debian package versions with apt

2
Summary by Arlolra

Parsoid is being ported to PHP where it will be distributed as part of core.

Ciencia Al Poder (talkcontribs)

So... there's no way to downgrade to parsoid 0.8.0 using apt.

> sudo apt-get install parsoid=0.8.0all
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '0.8.0all' for 'parsoid' was not found

> sudo apt-cache policy parsoid
parsoid:
  Installed: 0.9.0all
  Candidate: 0.9.0all
  Version table:
 *** 0.9.0all 500
        500 https://releases.wikimedia.org/debian jessie-mediawiki/main amd64 Packages
        100 /var/lib/dpkg/status                                             

Why there's not a proper way to handle versions in wikimedia's debian repository?

The only way to downgrade is to download the deb from https://people.wikimedia.org/~ssastry/parsoid/debs/ (and pray that nobody hacked it)

Note that apt-mark hold parsoid doesn't work when you're installing the package for the first time!

Legoktm (talkcontribs)

We use reprepro to create the Debian repository (not the full dak used by Debian) - I'm not sure whether it supports having multiple versions of a package.

Providing PGP signatures for https://people.wikimedia.org/~ssastry/parsoid/debs/ (or some better management of older versions) is definitely something we should improve.