gearbox-solutions / eloquent-filemaker

A Model extension and Eloquent driver for Laravel connecting to FileMaker through the Data API
https://gearboxgo.com
MIT License
56 stars 16 forks source link

Parameter value is invalid #61

Closed globestocker closed 10 months ago

globestocker commented 10 months ago

Dependencies

Description of the issue:

Created app locally, uploaded project to github. Using Laravel forge with DigitalOcean droplet, added repo to forge and deployed. Firstly was getting 500 server error, then updated environment on forge to have the same details as on my local .env now I'm getting this parameter value invalid.

I tried to redo everything. Firstly I left the environment the as default and ran npm build and it worked but then obviously the log in doesn't work. I've updated the environment db details back to filemaker jetstream database and getting 500 error again.

GearboxSolutions \ EloquentFileMaker \ Exceptions \ FileMakerDataApiException

Smef commented 10 months ago

This sounds like there's some part of the request to the FileMaker Data API which is invalid. Can you post some more details about what you're submitting which is causing this? A stack trace would also be helpful.

globestocker commented 10 months ago

I've tried changing a few things and it looks like it can see the filemaker solution on a different server. When configuring Laravel Forge it setup a database for mySQL wasn't sure if this might of modified something elsewhere?

GearboxSolutions\EloquentFileMaker\Exceptions\FileMakerDataApiException: Parameter value is invalid

globestocker commented 10 months ago

PHP version is slightly newer for the my forge PHP 8.2.13 compared to PHP 8.2.4 locally.

Smef commented 10 months ago

That shouldn't be an issue.

Can you post a code snippet of your query where you're creating this record?

globestocker commented 10 months ago

That shouldn't be an issue.

Can you post a code snippet of your query where you're creating this record?

This is just trying to access the base URL of the website. Is there something I've missed from deploying it through forge? Any CLI commands that need to be done?

Also when I changed something in the .env file it was saying it mentioned about the web_sessions layout. On my local version of the app web_sessions doesn't get populated even with being logged in?

Sorry to pain you.

It's been quite a steep learning curve with Laravel, Vue & Tailwind CSS but I can't thank you enough for the blogs/videos put out by you guys. Everything is pretty much built, its just the redeployment that's racking my brain.

Smef commented 10 months ago

The error that you're getting is some invalid data being sent when you're trying to create a record in your FileMaker database. I'm not sure if this is a session record you're trying to make or what. Unless you've customized your session behavior and configuration to work with FileMaker and made a sessions table in your FM database I would recommend trying redis or file-based sessions.

globestocker commented 10 months ago

Only thing I've modified to the original "Jetstream-FileMaker" file was to add 3 fields to the Users table. Nothing else has been modified. Locally it works perfectly fine.

Smef commented 10 months ago

What is your session driver?

globestocker commented 10 months ago

What is your session driver?

You just solved it.

SESSION_DRIVER was set to database and not file 😒

If I would of copied over the whole ENV the first time then I would of saved myself quite a few hours today.

Thank you Smef. Just tested and every element is working.