Skip to content

Strapi is failed to start. Error: invalid input syntax for type double precision #266

@alexdx-ca

Description

@alexdx-ca

Bug report

Describe the bug

I've got this error when starting Strapi:

   error:                                                                                                        
             UPDATE products                                                                                   
             SET location_geom = ST_SetSRID(ST_MakePoint(                                                       
                 CAST((location::json->'lng')::text AS DOUBLE PRECISION),                                         
                 CAST((location::json->'lat')::text AS DOUBLE PRECISION)                                             
                                                                                                                     
             ), 4326)                                                                                                
             WHERE (location::json->'lng')::text != 'null' AND                                                       
                   (location::json->'lat')::text != 'null' AND                                                      
                   location_geom IS NULL;                                                                            
              - invalid input syntax for type double precision: ""-65.4958325""     

Screenshots

Image

Workaround to start Strapi

Removing this from schema.json:

    "location": {
      "type": "customField",
      "customField": "plugin::location-plugin.location"
    }

Strart Strapi. Re-adding it and restart Strapi.
It doesn't cause any issues anymore.

System

  • Node.js version: v20.18.1
  • NPM version: 10.8.2
  • Strapi version: 4.25.8
  • Database: PostgreSQL 17.2
  • Operating system: MacOS 12.7.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    severity: mediumIf it breaks the basic use of the product but can be worked around

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions