Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity Details 500 for some AM data #229

Open
tiredpixel opened this issue Dec 5, 2023 · 0 comments
Open

Entity Details 500 for some AM data #229

tiredpixel opened this issue Dec 5, 2023 · 0 comments

Comments

@tiredpixel
Copy link
Contributor

When viewing some Armenian data in Register, clicking on some entity details links errors with HTTP 500 status.

e.g. https://register.openownership.org/entities/1880186386919833599/ , then Details.

The corresponding log lines are:

Dec 04 08:21:32 openownership-register-prd app/web.2 I, [2023-12-04T16:21:32.102333 #2]  INFO -- : [8f401a89-d7fe-47b8-94e7-c944c2dfb84f] Started GET "/entities/1880186386919833599/12367843285912579785" for REDACTED at 2023-12-04 16:21:32 +0000
Dec 04 08:21:32 openownership-register-prd app/web.2 I, [2023-12-04T16:21:32.103042 #2]  INFO -- : [8f401a89-d7fe-47b8-94e7-c944c2dfb84f] Processing by RelationshipsController#show as HTML
Dec 04 08:21:32 openownership-register-prd app/web.2 I, [2023-12-04T16:21:32.103090 #2]  INFO -- : [8f401a89-d7fe-47b8-94e7-c944c2dfb84f]   Parameters: {"entity_id"=>"1880186386919833599", "id"=>"12367843285912579785"}
Dec 04 08:21:35 openownership-register-prd heroku/router at=info method=GET path="/entities/1880186386919833599/12367843285912579785" host=register.openownership.org request_id=8f401a89-d7fe-47b8-94e7-c944c2dfb84f fwd="REDACTED" dyno=web.2 connect=0ms service=3442ms status=500 bytes=805 protocol=https
Dec 04 08:21:35 openownership-register-prd app/web.2 I, [2023-12-04T16:21:35.537728 #2]  INFO -- : [8f401a89-d7fe-47b8-94e7-c944c2dfb84f]   Rendered relationships/show.html.haml within layouts/application (Duration: 12.4ms | Allocations: 5633)
Dec 04 08:21:35 openownership-register-prd app/web.2 I, [2023-12-04T16:21:35.537950 #2]  INFO -- : [8f401a89-d7fe-47b8-94e7-c944c2dfb84f]   Rendered layout layouts/application.html.haml (Duration: 12.6ms | Allocations: 5663)
Dec 04 08:21:35 openownership-register-prd app/web.2 I, [2023-12-04T16:21:35.538193 #2]  INFO -- : [8f401a89-d7fe-47b8-94e7-c944c2dfb84f] Completed 500 Internal Server Error in 3435ms (Allocations: 9821071)
Dec 04 08:21:35 openownership-register-prd app/web.2 F, [2023-12-04T16:21:35.539722 #2] FATAL -- : [8f401a89-d7fe-47b8-94e7-c944c2dfb84f]   
Dec 04 08:21:35 openownership-register-prd app/web.2 [8f401a89-d7fe-47b8-94e7-c944c2dfb84f] ActionView::Template::Error (undefined method `to_date' for nil:NilClass
Dec 04 08:21:35 openownership-register-prd app/web.2 [8f401a89-d7fe-47b8-94e7-c944c2dfb84f]     13:           = formatted
Dec 04 08:21:35 openownership-register-prd app/web.2 [8f401a89-d7fe-47b8-94e7-c944c2dfb84f]     14:       %p.meta-secondary
Dec 04 08:21:35 openownership-register-prd app/web.2 [8f401a89-d7fe-47b8-94e7-c944c2dfb84f]     15:         = glossary_tooltip(t('.retrieved_at'), :retrieved_at, :right)
Dec 04 08:21:35 openownership-register-prd app/web.2 [8f401a89-d7fe-47b8-94e7-c944c2dfb84f]     16:         = relationship.provenance.retrieved_at.to_date
Dec 04 08:21:35 openownership-register-prd app/web.2 [8f401a89-d7fe-47b8-94e7-c944c2dfb84f]     17:       %p.meta-secondary
Dec 04 08:21:35 openownership-register-prd app/web.2 [8f401a89-d7fe-47b8-94e7-c944c2dfb84f]     18:         = glossary_tooltip(t('.imported_at'), :imported_at, :right)
Dec 04 08:21:35 openownership-register-prd app/web.2 [8f401a89-d7fe-47b8-94e7-c944c2dfb84f]     19:         = relationship.provenance.imported_at.to_date
Dec 04 08:21:35 openownership-register-prd app/web.2 [8f401a89-d7fe-47b8-94e7-c944c2dfb84f]   
Dec 04 08:21:35 openownership-register-prd app/web.2 [8f401a89-d7fe-47b8-94e7-c944c2dfb84f] app/views/relationships/_provenance.html.haml:16
Dec 04 08:21:35 openownership-register-prd app/web.2 [8f401a89-d7fe-47b8-94e7-c944c2dfb84f] app/views/relationships/show.html.haml:40
Dec 04 08:21:35 openownership-register-prd app/web.2 [8f401a89-d7fe-47b8-94e7-c944c2dfb84f] app/views/relationships/show.html.haml:24

Looking at the relationships controller, there is a MongoDB reference; however, I doubt that this is the cause (but it's curious to note):
https://github.com/openownership/register/blob/master/app/controllers/relationships_controller.rb#L19

Also potentially related are these log lines; they're also to do with relationships, and were errorring around the same time, but a connection hasn't been confirmed:

Dec 04 08:38:50 openownership-register-prd app/web.1 I, [2023-12-04T16:38:50.029306 #2]  INFO -- : [cfcd8ecb-992f-4b0e-b658-4147d172838e] Started GET "/entities/59b939c467e4ebf3405c9e58/5ab966779dfc3fae18b56399" for REDACTED at 2023-12-04 16:38:50 +0000
Dec 04 08:38:50 openownership-register-prd app/web.1 I, [2023-12-04T16:38:50.029937 #2]  INFO -- : [cfcd8ecb-992f-4b0e-b658-4147d172838e] Processing by RelationshipsController#show as HTML
Dec 04 08:38:50 openownership-register-prd app/web.1 I, [2023-12-04T16:38:50.029989 #2]  INFO -- : [cfcd8ecb-992f-4b0e-b658-4147d172838e]   Parameters: {"entity_id"=>"59b939c467e4ebf3405c9e58", "id"=>"5ab966779dfc3fae18b56399"}
Dec 04 08:38:51 openownership-register-prd app/web.1 I, [2023-12-04T16:38:51.030853 #2]  INFO -- : [cfcd8ecb-992f-4b0e-b658-4147d172838e] Completed 500 Internal Server Error in 1001ms (Allocations: 4408282)
Dec 04 08:38:51 openownership-register-prd app/web.1 F, [2023-12-04T16:38:51.330006 #2] FATAL -- : [cfcd8ecb-992f-4b0e-b658-4147d172838e]   
Dec 04 08:38:51 openownership-register-prd app/web.1 [cfcd8ecb-992f-4b0e-b658-4147d172838e] NoMethodError (undefined method `master_entity' for nil:NilClass
Dec 04 08:38:51 openownership-register-prd app/web.1 [cfcd8ecb-992f-4b0e-b658-4147d172838e]   
Dec 04 08:38:51 openownership-register-prd app/web.1 [cfcd8ecb-992f-4b0e-b658-4147d172838e] app/controllers/relationships_controller.rb:37:in `resolve_master_entity'
Dec 04 08:38:51 openownership-register-prd app/web.1 [cfcd8ecb-992f-4b0e-b658-4147d172838e] app/controllers/relationships_controller.rb:8:in `show'
Dec 04 08:38:51 openownership-register-prd heroku/router at=info method=GET path="/entities/59b939c467e4ebf3405c9e58/5ab966779dfc3fae18b56399" host=register.openownership.org request_id=cfcd8ecb-992f-4b0e-b658-4147d172838e fwd="REDACTED" dyno=web.1 connect=5ms service=1902ms status=500 bytes=805 protocol=https

It's not immediately clear what the cause of this is, especially since other data works (e.g. PSC data). It could potentially be related to issues with direct and indirect chains, first identified in Modelling review of Armenian extractives declarations Google document (2021). However, at present, no further investigation has been done about whether this is in fact the cause or related at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant