Page MenuHomeMiraheze

Extension:RSS fails to receive RSS feeds from external URLs.
Closed, ResolvedPublic

Description

Here is my Wiki page for confirmation:

Also before migration, we have confirmed that it works.

Event Timeline

dross triaged this task as Normal priority.Jan 17 2022, 09:25
Unknown Object (User) closed this task as Resolved.Jan 17 2022, 21:45
Unknown Object (User) claimed this task.

Sorry about that, it is now fixed.

Unknown Object (User) moved this task from Backlog to Short Term on the Technology-Team (MediaWiki) board.Jan 17 2022, 21:45
Unknown Object (User) edited projects, added Configuration; removed Extensions.
Unknown Object (User) moved this task from Unsorted to Short Term on the Universal Omega board.

The problem occurred again. I don't know how long it has been occurring.
It seems to depend on the MIME-type on the destination side.
I have tried several RSS feeds and servers with MIME-type of "text/xml" seem to be able to read them correctly.

Unknown Object (User) added a comment.Jun 18 2022, 22:44

This seems to be an issue with https://www.minecraft.net/en-us/feeds/community-content/rss, as I tried 3 other URLs which seems to return a valid output:

I just tried this, a random RSS feed I found online, using the exact function RSS uses to get HTTP responses:

> var_dump(MediaWiki\MediaWikiServices::getInstance()->getHttpRequestFactory()->create( 'https://rss.art19.com/apology-line', ['timeout' => 15,'followRedirects' => true,'maxRedirects' => 0,'proxy' => 'http://bast.miraheze.org:8080', 'noProxy' => false, 'userAgent' => "MediaWikiRSS/2.25.1 (+https://www.mediawiki.org/wiki/Extension:RSS) / MediaWiki RSS extension",],__METHOD__)->execute());
object(Status)#1761 (8) {
  ["cleanCallback"]=>
  bool(false)
  ["messageLocalizer":protected]=>
  NULL
  ["ok":protected]=>
  &bool(true)
  ["errors":protected]=>
  &array(0) {
  }
  ["value"]=>
  &int(200)
  ["success"]=>
  &array(0) {
  }
  ["successCount"]=>
  &int(0)
  ["failCount"]=>
  &int(0)
}

but when I do it for your URL that is not working:

> var_dump(MediaWiki\MediaWikiServices::getInstance()->getHttpRequestFactory()->create( 'https://www.minecraft.net/en-us/feeds/community-content/rss', ['timeout' => 15,'followRedirects' => true,'maxRedirects' => 0, 'noProxy' => false,'userAgent' => "MediaWikiRSS/2.25.1 (+https://www.mediawiki.org/wiki/Extension:RSS) / MediaWiki RSS extension",],__METHOD__)->execute());
object(Status)#1740 (8) {
  ["cleanCallback"]=>
  bool(false)
  ["messageLocalizer":protected]=>
  NULL
  ["ok":protected]=>
  &bool(false)
  ["errors":protected]=>
  &array(2) {
    [0]=>
    array(3) {
      ["type"]=>
      string(5) "error"
      ["message"]=>
      string(14) "http-timed-out"
      ["params"]=>
      array(1) {
        [0]=>
        string(59) "https://www.minecraft.net/en-us/feeds/community-content/rss"
      }
    }
    [1]=>
    array(3) {
      ["type"]=>
      string(5) "error"
      ["message"]=>
      string(15) "http-bad-status"
      ["params"]=>
      array(2) {
        [0]=>
        string(1) "0"
        [1]=>
        string(5) "Error"
      }
    }
  }
  ["value"]=>
  &int(0)
  ["success"]=>
  &array(0) {
  }
  ["successCount"]=>
  &int(0)
  ["failCount"]=>
  &int(0)
}

It returns http-timed-out, no matter how high I set the timeout (tried up to 180 seconds, and it is still timing out), so it must be an issue with that URL.

Thank you for your research. This URL can be displayed as plain text in the browser. I don't know but maybe it requires a special method to connection.

PS: I looked for a similar issue on bugs.mojang and found a report of not being able to receive it in Python as well. He reported that he was able to connect by disguising the UserAgent as a browser.

I have closed. The cause of this issue was the URL, not the Extension.