azu / philan.net

Public Donation Management webservice for Philanthropist.
https://philan.net
33 stars 1 forks source link

Display 500 when access user own page #67

Closed kyoncy closed 2 years ago

kyoncy commented 2 years ago

https://github.com/azu/philan.net/issues/58 と同じようにエラーの共有ばかりになってしまい申し訳ありません。

2022年の寄付情報を入力しようとしたのですが、 エラーが発生してユーザーページを閲覧できなくなったため報告させていただきました。

Error:Cannot read property 'effectiveValue' of undefined.

https://philan.net/user/kyoncy

image

azu commented 2 years ago

調べてみます。

2022年1月7日(金) 15:51 kyoncy @.***>:

58 https://github.com/azu/philan.net/issues/58

と同じようにエラーの共有ばかりになってしまい申し訳ありません。

2022年の寄付情報を入力しようとしたのですが、 エラーが発生してユーザーページを閲覧できなくなったため報告させていただきました。

Error:Cannot read property 'effectiveValue' of undefined.

https://philan.net/user/kyoncy

[image: image] https://user-images.githubusercontent.com/24786802/148503644-7f6245d2-21ad-405b-b738-460b01f2f403.png

— Reply to this email directly, view it on GitHub https://github.com/azu/philan.net/issues/67, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAE2ASBI327RD4ZQNG7LW3UU2EQVANCNFSM5LOEAUHQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Name : azu Mail : @.***

azu commented 2 years ago

https://github.com/azu/philan.net/blob/d01368b3c8278b87794edf2c7e37be9e3e18922f/web/pages/api/spreadsheet/budget/get.ts#L15-L46 Budgetsのシートがパースできなくてエラーになってるように見えます。

SpreadSheetの"Budgets"のタブはどのような感じになっていますか? 値自体がない行が存在してるようには見えるのですが、 https://philan.net/philan/budget ページから入力してもいまいち再現できてなくて。

image
azu commented 2 years ago

https://github.com/azu/philan.net/commit/cad71930d190ccaa156ddec27213472b8af2dc58 デバッグログを入れて確認してみたら、なぜか表示できるようになってしまいました… うーん、エラーがキャッシュされていたという訳でもなさそうだったのになんでだろ… とりあえずログをもうちょっと取れるようにしてみます。

azu commented 2 years ago

https://github.com/azu/philan.net/commit/c2ff47376c60fbbab0f9ed01b1ba1f9ec8a2bbdb でもう少し細かいログと、空の値があるようなセルは無視するような処理を入れてみました。

kyoncy commented 2 years ago

SpreadSheetの"Budgets"のタブはどのような感じになっていますか?

このようになっています。

image

今確認してみましたが、表示できていました。

このエラーが発生した際、 SpreadSheetを直接編集し "Budgets"タブのYear, Budget列しか入力せず、Used, Balance列を空にしていたので空の値が原因かもしれません。お手数おかけしました。

azu commented 2 years ago

Used, Balanceは式を使って動的な値になってる感じですね。( https://philan.net/philan/budget から入力すると自動的に追加される形にしていました)

image

とりあえず、表示できていそうなので一旦IssueはCloseします。 また表示できなくなっていたら遠慮なくRe-openして大丈夫です。 報告ありがとうございました