snowplow / snowplow/snowplow-javascript-tracker

Overflow in geolocation context

Open
#547 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

category:browser status:needs_triage type:defect
Dominant language
TypeScript
Stars
590
Forks
232
Avg merge
2h 22m
Merged PRs (30d)
3

Description

We got an overflow failure at data load for "geolocation_context" from one of our customers:

colname: latitude
type: float8
raw_field_value: 4.9406564584124654e-324
error: Overflow, 4.9406564584124654e-324 (Double valid range 2.225074e-308 to 1.797693e+308)

The value range as per JSON schema:

	"properties": {
		"latitude": {
			"type": "number",
			"minimum": -90,
			"maximum": 90
		},

The value range as per DDL:

latitude                    float not null,

It appears the type of the parameter would have to be redefined (not sure if that is a valid value provided by Geolocation API).

More details are in https://snowplow.zendesk.com/agent/tickets/3595

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the geolocation_context JSON schema and DDL shown in the issue, then trace the data-load path that parses latitude values. Reproduce the failure using 4.9406564584124654e-324 and compare the accepted JSON range with the float8 handling. Done means the load behavior is defined and the reported valid geolocation value no longer causes an unexpected overflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.