Closed kromiii closed 1 year ago
@kromiii ご報告ありがとうございます。 ローカルでは再現せず、Cloudflare でのみ再現するとのこと承知しました。 Cloudflare での文字化けは毎回発生しますでしょうか?それとも文字化けしないときもありますか?
amazon の Web bookmark は毎回文字化けするか説明文が空欄になります。amazonのリンク以外(Youtubeなど)は文字化けしないです。
@kromiii 詳細ありがとうございます。 時間はかかると思いますが調査してみます。
@kromiii https://github.com/otoyo/astro-notion-blog/pull/160 で修正したので最新のmainブランチを取り込んでご確認ください。
ありがとうございます。取り込んで再度デプロイしてみました。 文字化けは無くなったのですが、WebBookmark が白紙になってしまいました。
一応デプロイ時のログも共有します。
2023-08-22T23:53:16.986104Z Cloning repository...
2023-08-22T23:53:17.825253Z From https://github.com/kromiii/astro-notion-blog
2023-08-22T23:53:17.825936Z * branch 36bd6f63de1da821cd1d11d3c4cf4125ff1309bf -> FETCH_HEAD
2023-08-22T23:53:17.826168Z
2023-08-22T23:53:17.898942Z HEAD is now at 36bd6f6 Merge pull request #1 from otoyo/main
2023-08-22T23:53:17.899714Z
2023-08-22T23:53:18.014763Z
2023-08-22T23:53:18.04755Z Success: Finished cloning repository files
2023-08-22T23:53:18.773104Z Detected the following tools from environment: nodejs@18.16.0, npm@9.5.1
2023-08-22T23:53:18.773832Z Installing nodejs 18.16.0
2023-08-22T23:53:19.97524Z Trying to update node-build... ok
2023-08-22T23:53:20.263329Z Downloading node-v18.16.0-linux-x64.tar.gz...
2023-08-22T23:53:20.263693Z -> https://nodejs.org/dist/v18.16.0/node-v18.16.0-linux-x64.tar.gz
2023-08-22T23:53:22.029105Z Installing node-v18.16.0-linux-x64...
2023-08-22T23:53:23.57345Z Installed node-v18.16.0-linux-x64 to /opt/buildhome/.asdf/installs/nodejs/18.16.0
2023-08-22T23:53:23.574015Z
2023-08-22T23:53:25.01147Z Installing project dependencies: npm clean-install --progress=false
2023-08-22T23:53:44.378454Z
2023-08-22T23:53:44.379201Z added 874 packages, and audited 875 packages in 18s
2023-08-22T23:53:44.379506Z
2023-08-22T23:53:44.37971Z 241 packages are looking for funding
2023-08-22T23:53:44.379946Z run `npm fund` for details
2023-08-22T23:53:44.41493Z
2023-08-22T23:53:44.415326Z 6 vulnerabilities (5 moderate, 1 high)
2023-08-22T23:53:44.415563Z
2023-08-22T23:53:44.415719Z To address issues that do not require attention, run:
2023-08-22T23:53:44.415868Z npm audit fix
2023-08-22T23:53:44.416023Z
2023-08-22T23:53:44.416201Z To address all issues (including breaking changes), run:
2023-08-22T23:53:44.416343Z npm audit fix --force
2023-08-22T23:53:44.416479Z
2023-08-22T23:53:44.41661Z Run `npm audit` for details.
2023-08-22T23:53:44.441054Z Executing user command: npm run build
2023-08-22T23:53:45.44888Z
2023-08-22T23:53:45.449428Z > astro-notion-blog@0.6.3 build
2023-08-22T23:53:45.449687Z > astro build
2023-08-22T23:53:45.449858Z
2023-08-22T23:53:47.579789Z 11:53:47 PM [content] No content directory found. Skipping type generation.
2023-08-22T23:53:47.827286Z 11:53:47 PM [build] output target: static
2023-08-22T23:53:47.827703Z 11:53:47 PM [build] Collecting build info...
2023-08-22T23:53:47.828378Z 11:53:47 PM [build] Completed in 312ms.
2023-08-22T23:53:47.829689Z 11:53:47 PM [build] Building static entrypoints...
2023-08-22T23:53:51.929536Z 11:53:51 PM [build] Completed in 4.10s.
2023-08-22T23:53:51.930216Z
2023-08-22T23:53:51.930433Z building client
2023-08-22T23:54:07.835745Z [33m
2023-08-22T23:54:07.83654Z (!) Some chunks are larger than 500 kBs after minification. Consider:
2023-08-22T23:54:07.836749Z - Using dynamic import() to code-split the application
2023-08-22T23:54:07.836895Z - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
2023-08-22T23:54:07.837099Z - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.[39m
2023-08-22T23:54:07.837283Z Completed in 15.91s.
2023-08-22T23:54:07.837452Z
2023-08-22T23:54:07.837593Z
2023-08-22T23:54:07.837726Z generating static routes
2023-08-22T23:54:07.857446Z ▶ src/pages/index.astro
2023-08-22T23:54:08.965266Z └─ /index.html (+1.12s)
2023-08-22T23:54:08.967926Z ▶ src/pages/posts/page/[page].astro
2023-08-22T23:54:08.994207Z └─ /posts/page/2/index.html (+27ms)
2023-08-22T23:54:08.997544Z ▶ src/pages/posts/tag/[tag]/page/[page].astro
2023-08-22T23:54:09.004935Z ▶ src/pages/posts/tag/[tag].astro
2023-08-22T23:54:09.01732Z ├─ /posts/tag/Book/index.html (+17ms)
2023-08-22T23:54:09.039715Z ├─ /posts/tag/Diary/index.html (+40ms)
2023-08-22T23:54:09.048402Z ├─ /posts/tag/Food/index.html (+48ms)
2023-08-22T23:54:09.060535Z ├─ /posts/tag/Health/index.html (+60ms)
2023-08-22T23:54:09.071014Z ├─ /posts/tag/Introduction/index.html (+71ms)
2023-08-22T23:54:09.079079Z ├─ /posts/tag/Life/index.html (+79ms)
2023-08-22T23:54:09.091643Z ├─ /posts/tag/ガジェット/index.html (+92ms)
2023-08-22T23:54:09.099486Z └─ /posts/tag/読書/index.html (+99ms)
2023-08-22T23:54:09.973949Z ▶ src/pages/posts/[slug].astro
2023-08-22T23:54:10.807347Z ├─ /posts/yukyu-quiz-bite/index.html (+1.70s)
2023-08-22T23:54:11.824468Z ├─ /posts/handdrip-coffee/index.html (+2.72s)
2023-08-22T23:54:12.355818Z ├─ /posts/return-to-papers/index.html (+3.25s)
2023-08-22T23:54:13.091781Z ├─ /posts/two-types-of-minimalist/index.html (+3.99s)
2023-08-22T23:54:13.569251Z ├─ /posts/afraid-from-freedom/index.html (+4.47s)
2023-08-22T23:54:13.803181Z ├─ /posts/necessity-of-monitor/index.html (+4.70s)
2023-08-22T23:54:14.263689Z ├─ /posts/tips-of-continue/index.html (+5.16s)
2023-08-22T23:54:16.246371Z ├─ /posts/dangers-of-sitting/index.html (+7.14s)
2023-08-22T23:54:17.505015Z ├─ /posts/jodein-takaraduka/index.html (+8.40s)
2023-08-22T23:54:18.161023Z ├─ /posts/publications/index.html (+9.06s)
2023-08-22T23:54:23.155474Z └─ /posts/self-introduction/index.html (+14.05s)
2023-08-22T23:54:23.179108Z λ src/pages/feed.ts
2023-08-22T23:54:23.186225Z └─ /feed (+28ms)
2023-08-22T23:54:23.186748Z Completed in 15.35s.
2023-08-22T23:54:23.186977Z
2023-08-22T23:54:23.315175Z cp: cannot stat 'public/notion/*': No such file or directory
2023-08-22T23:54:23.3205Z 11:54:23 PM [build] 21 page(s) built in 35.80s
2023-08-22T23:54:23.320974Z 11:54:23 PM [build] Complete!
2023-08-22T23:54:23.36846Z Finished
2023-08-22T23:54:23.369435Z Note: No functions dir at /functions found. Skipping.
2023-08-22T23:54:23.369731Z Validating asset output directory
2023-08-22T23:54:24.16109Z Deploying your site to Cloudflare's global network...
2023-08-22T23:54:26.788664Z Uploading... (65/65)
2023-08-22T23:54:26.789614Z ✨ Success! Uploaded 0 files (65 already uploaded) (0.47 sec)
2023-08-22T23:54:26.789859Z
2023-08-22T23:54:27.066216Z ✨ Upload complete!
2023-08-22T23:54:29.000525Z Success: Assets published!
2023-08-22T23:54:29.676794Z Success: Your site was deployed!
確かに真っ白になっていますね。。 ローカルだと正常に動作するのに謎ですね。。
はい、でも @otoyo さんの対応感謝です 🙏
@kromiii ブックマークを生成する際にクラウドサービスからAmazonへのアクセスがブロックされているようでした。。
2023-08-23T00:18:02.42121766Z <!--
2023-08-23T00:18:02.421320441Z To discuss automated access to Amazon data please contact api-services-support@amazon.com.
2023-08-23T00:18:02.421441327Z For information about migrating to our APIs refer to our Marketplace APIs at https://developer.amazonservices.jp/ref=rm_5_sv, or our Product Advertising API at https://affiliate.amazon.co.jp/gp/advertising/api/detail/main.html/ref=r
m_5_ac for advertising use cases.
2023-08-23T00:18:02.42213467Z -->
Notionで表示されるのはNotionがAmazon のAPIを契約しているからな気がします。
真っ白な表示はさすがに見た目が悪いのでちょっとどうするか考えますね。
@kromiii Amazon APIを使うには個人で利用開始申請をしなければいけなかったのでやはりダメでした。 消極的ですが、Amazonリンクはブックマークの対象外とする方向で対応しました。 https://github.com/otoyo/astro-notion-blog/pull/163
Amazonの場合はテキストリンクを使用いただければと思います。
@otoyo ありがとうございます。ご対応感謝します 🙏
不具合の概要
notion で作成した Web Bookmark に日本語が含まれていると Cloudflare で build した際に文字化けする
再現方法
notion で Web Bookmark を作成する(この時点では文字化けしていない)
localhost で確認する(画像は表示されなくなってしまうが文字化けはしていない)
Cloudflare でデプロイ後(文字化けしてしまっている)
不具合が発生しているサイト:https://kromiii.info/posts/afraid-from-freedom/
エラーログ
ブラウザの開発者コンソールでのログはなし
Cloudflare のログ
期待する挙動
Web Bookmark に日本語が含まれていても文字化けしない (できれば)Notion に含まれる画像も正しく表示される
リポジトリとブランチ名
https://github.com/kromiii/astro-notion-blog
デスクトップ環境
追加情報
特になし