Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
本番だけWebViewが500エラーになる
Search
Hayate Kuronuma
September 29, 2026
Programming
47
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
本番だけWebViewが500エラーになる
Hayate Kuronuma
September 29, 2026
More Decks by Hayate Kuronuma
See All by Hayate Kuronuma
ユーザー価値を届け続けるために、ウォンテッドリーが大切にしている文化
hayatekuronuma
0
6
UIKitにSwiftUIを埋め込んだら 罠にハマった話
hayatekuronuma
0
14
Other Decks in Programming
See All in Programming
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
7
1.9k
残高管理から台帳サービスへの進化
artoy
0
140
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
690
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
450
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
580
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
150
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
130
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.5k
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.8k
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
450
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
280
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
290
The SEO Collaboration Effect
kristinabergwall1
1
590
Making the Leap to Tech Lead
cromwellryan
135
10k
WENDY [Excerpt]
tessaabrams
14
40k
Ruling the World: When Life Gets Gamed
codingconduct
0
390
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
500
Color Theory Basics | Prateek | Gurzu
gurzu
1
480
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
450
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
260
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
The Curious Case for Waylosing
cassininazir
1
550
Transcript
#25 Mobile勉強会 ウォンテッドリー × チームラボ 本番だけWebViewが500になる Sep.29 2026 - Hayate
Kuronuma © 2026 Wantedly, Inc.
⾃⼰紹介 名前:黒沼 疾風 / Hayate Kuronuma 入社:2025年9月 ポジション: iOSエンジニア 性格診断:コントリビューター
MBTI:ISFP (冒険家) © 2026 Wantedly, Inc.
A⾯B⾯ジェネレーター © 2026 Wantedly, Inc.
起きたこと 本番だけ 500 になる アプリ内 WebView で開くページが、本番でだけエラーページになる。検証環境では再現しない。 © 2026 Wantedly,
Inc.
起きた範囲 Android の本番だけ 500 になる 検証環境 本番 Android 正常 500
iOS 正常 正常 © 2026 Wantedly, Inc.
Androidで起きていたこと Authorization がリダイレクトを越えていた WebView トークン→Cookie ⽬的のページ エンドポイント SSR 上流 API
① loadUrl + Bearer ② 302 + Set-Cookie shouldOverrideUrlLoading 何もせず進める ③ Cookie + Bearer(そのまま持ち越し) ④ Bearer を素通し ⑤ 検証に失敗 ⑥ 500 © 2026 Wantedly, Inc.
検証環境では問題なかったわけ 検証環境は、たまたま助かっていた WebView トークン→Cookie ⽬的のページ エンドポイント SSR 上流 API ①
loadUrl + Bearer ② 302 + Set-Cookie shouldOverrideUrlLoading 検証環境⽤ヘッダに付け替え ③ loadUrl + Basic(Cookie あり、Bearer は消えた) ④ Basic を素通し ⑤ Basic は無視して成功 ⑥ 200 © 2026 Wantedly, Inc.
原因 - Chromiumを⾒てみる 同じドメインの中なら、ヘッダは外されない Android WebView がリダイレクトのたびに呼ぶ処理 ─ aw_url_loader_throttle.cc(抜粋) void
AwURLLoaderThrottle::WillRedirectRequest(...) { bool is_same_domain = net::registry_controlled_domains::SameDomainOrHost( redirect_info->new_url, original_origin_, net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES); if (!is_same_domain) { // The headers we added must be removed. headers_update_params->removed_headers.insert(...); } } 同じドメインの中のリダイレクト → 付けたヘッダを残す © 2026 Wantedly, Inc. 別のドメインへ出るリダイレクト → 付けたヘッダを外す
iOS との違い iOS では起きなかった Android iOS loadUrl(url, headers) load(URLRequest) 同じドメインの中なら、リダイレクトの先にも
ホストが変わる リダイレクトで Authorization 付く。 を落とす。 © 2026 Wantedly, Inc.
直し⽅ 本番でも、ヘッダなしで開き直す WebView トークン→Cookie ⽬的のページ エンドポイント SSR 上流 API ①
loadUrl + Bearer ② 302 + Set-Cookie shouldOverrideUrlLoading ⽌めて読み直す(本番でも) ③ loadUrl(Cookie あり、Bearer は外した) ④ Cookie で問い合わせ ⑤ 成功 ⑥ 200 © 2026 Wantedly, Inc.
まとめ 01 02 03 リダイレクト先にも届く 外すなら、読み直す 環境差分を認識する 同じドメインの中なら、 リダイレクトを⽌めて、必 環境独⾃の設定があり、完
loadUrl のヘッダは外され 要なヘッダだけで loadUrl 全に本番の保証にならない ない。 し直す。 ことがある。 © 2026 Wantedly, Inc.
ご清聴ありがとうございました! © 2026 Wantedly, Inc.