Page MenuHomePhabricator

WikibaseImport in current docker file (wikibase 1.35) not working
Closed, DeclinedPublicBUG REPORT

Description

I'm fairly new to the Wikiverse, so please bear with me :)

After setting up wikibase docker following the instruction manual, I failed importing the Wikidata properties via WikibaseImport:

root@810f59c74fc2:/var/www/html/extensions/WikibaseImport# php maintenance/importEntities.php --all-properties
[09ba2494a6d52bead3c9e5ab] [no req]   Error from line 2121 of /var/www/html/extensions/Wikibase/repo/includes/WikibaseRepo.php: Using $this when not in object context
Backtrace:
#0 /var/www/html/extensions/WikibaseImport/src/EntityImporterFactory.php(132): Wikibase\Repo\WikibaseRepo::getEntityNamespaceLookup()
#1 /var/www/html/extensions/WikibaseImport/src/EntityImporterFactory.php(73): Wikibase\Import\EntityImporterFactory->getEntityNamespaceLookup()
#2 /var/www/html/extensions/WikibaseImport/maintenance/importEntities.php(127): Wikibase\Import\EntityImporterFactory->newEntityImporter()
#3 /var/www/html/extensions/WikibaseImport/maintenance/importEntities.php(77): Wikibase\Import\Maintenance\ImportEntities->newEntityImporter()
#4 /var/www/html/maintenance/doMaintenance.php(107): Wikibase\Import\Maintenance\ImportEntities->execute()
#5 /var/www/html/extensions/WikibaseImport/maintenance/importEntities.php(133): require_once(string)
#6 {main}

I did some digging and found the connection to QuickStatements, tried using that. Opening my browser at http://localhost:9191/#/ worked fine, but when I tried to log in I got:

<b>Fatal error</b>:  Uncaught Exception: Error retrieving token1: {&amp;quot;error&amp;quot;:&amp;quot;mwoauth-callback-not-oob-or-prefix&amp;quot;,&amp;quot;message&amp;quot;:&amp;quot;oauth_callback must be set, and must be set to \&amp;quot;oob\&amp;quot; (case-sensitive), or the configured callback must be a prefix of the supplied callback.&amp;quot;,&amp;quot;callback&amp;quot;:&amp;quot;api.php&amp;quot;} in /var/www/html/magnustools/public_html/php/oauth.php:284
Stack trace:
#0 /var/www/html/quickstatements/public_html/api.php(89): MW_OAuth-&gt;doAuthorizationRedirect('api.php')
#1 {main}
 thrown in <b>/var/www/html/magnustools/public_html/php/oauth.php</b> on line <b>284</b><br />

Doing some digging again I found the issue already solved: https://github.com/magnusmanske/quickstatements/commit/5be608271811787f039dcd643a6866c2fff45d99

Looking at the supposedly changed files inside the docker container, there are only old versions. So my guess is that when the container was created with old versions and some stuff broke.
As I said before, I'm new to this and the mistake might be completely on my end.

It would be much appreciated to point me in the direction of a quick fix, since I want to keep working on my little project :)

Event Timeline

Addshore added a subscriber: Addshore.

current docker file (wikibase 1.35)

Would you be able to specify what image tag exactly you are using?

I used the docker-compose.yml of the current master branch to pull.
https://github.com/wmde/wikibase-docker/blob/master/docker-compose.yml

Edit: I guess that means: wikibase/wikibase:1.35-bundle

So, we no longer support the wikibase-docker repository

Please see the following announcement for the new docker images that now have a new home.
https://lists.wikimedia.org/hyperkitty/list/wikibaseug@lists.wikimedia.org/thread/WW4LZJINT3PIG3DOYKTXIWVP3WAKWXCT/

Also take a look at https://www.mediawiki.org/wiki/Wikibase/Docker

As for WikibaseImport, unfortunately this extension doesn't really have an owner.
But it looks like some code relating to your error was recently touched
https://github.com/Wikidata/WikibaseImport/pull/8
T277313: Move WikibaseRepo EntityNamespaceLookup to service container

Wikibase import is not included within the bundle of new extensions, but you should be able to load it yourself, and using the latest version in the repo I imagine your issue will be gone!

For the quickstatements issue you'll likely find that using the new docker images will solve your problem.!

Going to close this ticket for now, but more than happy to see more tickets relating to the new wikibase docker images!

Thanks a lot! You guys are awesome! :)