antonioribeiro / antonioribeiro/tracker

Issue with Firefox and SQL server database

Open
#458 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
2.9k
Forks
594
PR merge metrics
No merged PRs in 30d

Description

I am getting this error when I open the page from firefox browser.

I found that the data in tracker_devices tables are like webkit(string) and some 0 (integer) for model column.

How to fix this issue ?

> [2019-08-30 12:24:19] production.ERROR: SQLSTATE[22018]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Conversion failed when converting the nvarchar value 'WebKit' to data type int. (SQL: select top 1 * from [tracker_devices] where [kind] = Computer and [model] = 0 and [platform] = Windows and [platform_version] = 10) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 22018): SQLSTATE[22018]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Conversion failed when converting the nvarchar value 'WebKit' to data type int. (SQL: select top 1 * from [tracker_devices] where [kind] = Computer and [model] = 0 and [platform] = Windows and [platform_version] = 10) at C:\\wamp64\\www\\blog\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php:664, Doctrine\\DBAL\\Driver\\PDOException(code: 22018): SQLSTATE[22018]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Conversion failed when converting the nvarchar value 'WebKit' to data type int. at C:\\wamp64\\www\\blog\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOStatement.php:119, PDOException(code: 22018): SQLSTATE[22018]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Conversion failed when converting the nvarchar value 'WebKit' to data type int. at C:\\wamp64\\www\\blog\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOStatement.php:117)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the tracker_devices lookup shown in the report and compare the Firefox-produced model values with the SQL Server column type. Reproduce the failing query with the reported WebKit and integer values, then verify the fix against SQL Server and Firefox input. Done means the lookup no longer raises the conversion error and the affected behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php, sql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.