Just-Moh-it / Pckd

The ⚡️ analytics-intensive, self-hostable link-shortener with a beautiful UI | AKA free bit.ly alternative 🚀
https://docs.pckd.me/
MIT License
783 stars 95 forks source link

`TypeError: x.timezone.offset is null` after first hit #31

Closed scottwallacesh closed 2 years ago

scottwallacesh commented 2 years ago

Brand new installation in Docker. Created my first test short link with tracking enabled. Dashboard shows everything correctly.

After the first hit, when re-visiting the dashboard the page loads and then goes blank. Tried in both Firefox and Chrome - same behaviour.

Browser console shows: TypeError: x.timezone.offset is null

PostgresDB entry shows:

pckd=# select * from "Hits";
            id             |          ip           | type | isp | timezoneName | timezoneOffset | timezoneId | timezoneAbbreviation | locationName | locationCity | locationPostal | locationCountryName | locationCountryCode | locationContinentName | locationContinentCode | browserName | browserVersion | O
SName | OSVersion |          pckdId           |        createdAt        |        updatedAt        
---------------------------+-----------------------+------+-----+--------------+----------------+------------+----------------------+--------------+--------------+----------------+---------------------+---------------------+-----------------------+-----------------------+-------------+----------------+--
------+-----------+---------------------------+-------------------------+-------------------------
 cl366nqzi0793ncqomtfyca0t | 10.0.9.254, 10.0.3.21 |      |     |              |                |            |                      |              |              |                |                     |                     |                       |                       | Firefox     | 100.0          | L
inux  | x86_64    | cl366mvmt0756ncqof4yd7dm1 | 2022-05-14 18:09:35.838 | 2022-05-14 18:09:35.839

Any ideas what might be going wrong?

Just-Moh-it commented 2 years ago

The docker installation currently has problems with tracking, and we're looking into adding full support. I'd suggest you to go with the manual installation for now.

Suspecting by the IP value in the table, it looks like the IP Registry API is sending multiple IP addresses and hence the app is unable to parse the geolocation from the response. We'll look into it... It might as well be a problem with the docker install.

Apart from the inconveniences it might cause, the manual installed version is much more stable for now and may fix the issue. Though this does not solve the issue, it would help temporarily until docker support is added completely.

Thanks for trying out Pckd 😃