https://dev.mikutter.hachune.net/
https://dev.mikutter.hachune.net/favicon.ico?1619448608
2020-06-06T06:13:59Z
やること
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4602
2020-06-06T06:13:59Z
toshi_a 初音
toshi.alternative@gmail.com
<ul></ul><p>私の環境では問題なくstreaming接続できており、毎秒再接続はしません。</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4610
2020-06-11T15:37:28Z
cob odo
cobodo@gmail.com
<ul></ul><p>これ、うちの環境(Ubuntu20.04 on WSL2)でも起きてますね。<br />詳しく追えてないですが報告まで。</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4611
2020-06-11T19:50:37Z
Yuto Tokunaga
yuntan.sub1@gmail.com
<ul><li><strong>説明</strong> を更新 (<a title="差分を表示" href="/journals/4611/diff?detail_id=4877">差分</a>)</li></ul>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4612
2020-06-11T20:22:27Z
Yuto Tokunaga
yuntan.sub1@gmail.com
<ul></ul><p>関係があるのかは分かりませんが, <code>start</code> <a href="https://dev.mikutter.hachune.net/projects/mikutter/repository/main/revisions/develop/entry/plugin/mastodon_sse_streaming/connection.rb#L38" class="external">plugin/mastodon_sse_streaming/connection.rb:38</a> の例外処理の文法が間違っている気がします.<code>do</code>と<code>rescue</code>・<code>ensure</code>が対応していますが,<code>do</code>ブロックにこのような文法はないはずです.</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4613
2020-06-11T20:30:08Z
Yuto Tokunaga
yuntan.sub1@gmail.com
<ul><li><strong>説明</strong> を更新 (<a title="差分を表示" href="/journals/4613/diff?detail_id=4878">差分</a>)</li><li><strong>対象バージョン</strong> を <i>4.1</i> から <i>5.1</i> に変更</li></ul><p>デバッグログを入れて見てみると,<a href="https://dev.mikutter.hachune.net/projects/mikutter/repository/main/revisions/develop/entry/plugin/mastodon_sse_streaming/connection.rb#L62" class="external">plugin/mastodon_sse_streaming/connection.rb:62</a> でリクエストの度にすぐに404が返ってきているみたいです.</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4614
2020-06-12T11:55:52Z
toshi_a 初音
toshi.alternative@gmail.com
<ul></ul><blockquote>
<p>関係があるのかは分かりませんが, start plugin/mastodon_sse_streaming/connection.rb:38 の例外処理の文法が間違っている気がします.doとrescue・ensureが対応していますが,doブロックにこのような文法はないはずです.</p>
</blockquote>
<p><a class="external" href="https://bugs.ruby-lang.org/issues/12906">https://bugs.ruby-lang.org/issues/12906</a> で、Ruby 2.5から利用できるようになったので、mikutterでは利用しています。</p>
<blockquote>
<p>デバッグログを入れて見てみると,plugin/mastodon_sse_streaming/connection.rb:62 でリクエストの度にすぐに404が返ってきているみたいです.</p>
</blockquote>
<p>この部分だと、responseが帰ってくる=接続が切れた ということになりますね。単純にmikutterがリクエストしているエンドポイントが対象サーバに実装されていないという可能性が高いので、再現するサーバの情報もう少し集めたいです</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4616
2020-06-12T12:45:43Z
toshi_a 初音
toshi.alternative@gmail.com
<ul><li><strong>ステータス</strong> を <i>分類待ち</i> から <i>実装待ち</i> に変更</li></ul><pre>
notice: {MIKUTTER_DIR}/plugin/mastodon_sse_streaming/connection.rb:57:in `connect': connect https://social.mikutter.hachune.net/api/v1/streaming/list?list=12
</pre>
<p>何故か俺の環境でも再現するようになった、この間見たときは大丈夫だったのに。</p>
<p>サーバはsocial.mikutter.hachune.netです</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4617
2020-06-12T12:51:36Z
Shibafu Midorino
<ul></ul><p>こちら ertona.net , social.mikutter.hachune.net , mstdn.maud.io への接続にて再現を確認しました。</p>
<pre>
notice: {MIKUTTER_DIR}/plugin/mastodon_sse_streaming/connection.rb:57:in `connect': connect https://ertona.net/api/v1/streaming/list?list=1
notice: {MIKUTTER_DIR}/plugin/mastodon_sse_streaming/connection.rb:57:in `connect': connect https://social.mikutter.hachune.net/api/v1/streaming/list?list=6
notice: {MIKUTTER_DIR}/plugin/mastodon_sse_streaming/connection.rb:57:in `connect': connect https://mstdn.maud.io/api/v1/streaming/list?list=248
</pre>
<p>この時のサーバー側アクセスログを確認したところ、パラメータ <code>list</code> が二重に送信されていることが分かりました。</p>
<pre>
240b:10:**** - - [12/Jun/2020:12:48:07 +0000] "GET /api/v1/streaming/list?list=1&list=1 HTTP/1.1" 404 32 "-" "HTTPClient/1.0 (2.8.3, ruby 2.7.0 (2019-12-25))" "-"
240b:10:**** - - [12/Jun/2020:12:48:08 +0000] "GET /api/v1/streaming/list?list=1&list=1 HTTP/1.1" 404 32 "-" "HTTPClient/1.0 (2.8.3, ruby 2.7.0 (2019-12-25))" "-"
240b:10:**** - - [12/Jun/2020:12:48:09 +0000] "GET /api/v1/streaming/list?list=1&list=1 HTTP/1.1" 404 32 "-" "HTTPClient/1.0 (2.8.3, ruby 2.7.0 (2019-12-25))" "-"
</pre>
<p><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="バグ: 抽出タブのデータソースにmastodonのリストが表示されない (終了)" href="https://dev.mikutter.hachune.net/issues/1442">#1442</a> の修正にてオーバーライドしたModelの <code>#uri</code> と、元々使っていたパラメータのHashがリクエスト時にHTTPクライアントによって合成されてしまっているものと考えられます。</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4618
2020-06-12T12:51:50Z
Yuto Tokunaga
yuntan.sub1@gmail.com
<ul></ul><blockquote>
<p><a class="external" href="https://bugs.ruby-lang.org/issues/12906">https://bugs.ruby-lang.org/issues/12906</a> で、Ruby 2.5から利用できるようになったので、mikutterでは利用しています。</p>
</blockquote>
<p>便利!(なぜかウチのvimで正しくハイライトされてない)</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4619
2020-06-12T12:53:20Z
Yuto Tokunaga
yuntan.sub1@gmail.com
<ul></ul><blockquote>
<p><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="バグ: 抽出タブのデータソースにmastodonのリストが表示されない (終了)" href="https://dev.mikutter.hachune.net/issues/1442">#1442</a> の修正にてオーバーライドしたModelの <code>#uri</code> と、元々使っていたパラメータのHashがリクエスト時にHTTPクライアントによって合成されてしまっているものと考えられます。</p>
</blockquote>
<p>あっ(窒息)</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4620
2020-06-12T12:58:51Z
toshi_a 初音
toshi.alternative@gmail.com
<ul></ul><p><a href="#note-8">#note-8</a></p>
<p>uriは、等価なmodelであれば同じ値であるべきです。ユーザに表示するものではありません。<br />perma_linkは、同一性の判定には使われず、それに対応するWeb上のURLを返すことを期待します。ない場合は <code>nil</code> を返して構いません。</p>
<p>以上のことから、uriは必ずしもAPIエンドポイントのURLを返す必要はないです。(俺の実装が間違っているのですが)この場合、perma_linkがクエリパラメータ込みのストリーミングAPIのURLを返し、接続するほうは単にperma_linkを使う(あとからクエリパラメータをつけるといったURLの加工をしない)のが良いと思います。</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4621
2020-06-12T13:05:36Z
cob odo
cobodo@gmail.com
<ul></ul><p>うちで再現してる接続先は <a class="external" href="https://mstdn.kanagu.info">https://mstdn.kanagu.info</a> すなわち弊サーバーです。<br />mastodon側の挙動変更によるもの、という可能性もなくはないかなと思いますね……</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4622
2020-06-12T13:52:09Z
Shibafu Midorino
<ul><li><strong>ステータス</strong> を <i>実装待ち</i> から <i>レビュー待ち</i> に変更</li><li><strong>ブランチ</strong> を <i>topic/1449-sse-authorized-type-perma-link</i> にセット</li></ul><p><a href="#note-11">#note-11</a> の方針で修正をコミットしました。レビューをお願いします。</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4623
2020-06-12T14:07:17Z
toshi_a 初音
toshi.alternative@gmail.com
<ul><li><strong>担当者</strong> を <i>Yuto Tokunaga</i> にセット</li></ul><p>俺が見た感じ大丈夫そうな気がしました。yuntanも見てもらって大丈夫そうだったらdevelopにmergeしてくれて良いです</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4624
2020-06-12T14:11:20Z
Yuto Tokunaga
yuntan.sub1@gmail.com
<ul></ul><p>checkoutして一秒に一回再接続する問題が解決していることを確認しました.</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=4625
2020-06-12T14:13:12Z
Yuto Tokunaga
yuntan.sub1@gmail.com
<ul><li><strong>ステータス</strong> を <i>レビュー待ち</i> から <i>終了</i> に変更</li></ul><p>merged</p>
mikutter - バグ #1449: mastodon: リストのストリーミングAPIに一秒に一回再接続している
https://dev.mikutter.hachune.net/issues/1449?journal_id=5067
2021-12-09T13:01:28Z
toshi_a 初音
toshi.alternative@gmail.com
<ul><li><strong>対象バージョン</strong> を <i>5.1</i> から <i>5.0</i> に変更</li></ul>