I cannot create a 1-1 relation at all. The moment i try to create a new record the API throws “Maximum call stack exceeded” error.
This is a BRAND NEW project. In the admin panel i create a Ticket collection with one field, name. I create a second collection called Format with one field, name. Both are saved and now show as collections in the admin panel. I edit the Ticket collection and add a 1-1 relation. “Ticket has one format”. Add that and save it. Now when i try to add a new Ticket, the error shows up. I’ve created 10 new projects and done this exact sequence and it FAILS every time.
What is the problem here? I really wanted to migrate a huge project to strapi but i cant do a simple relation…HALP
OS: Windows 7
Postrgres 10 locally installed
@mkirkland What version of node are you using, while I don’t have a Windows 7 system to test on, I have tested on a few other systems:
- Linux Mint 20
- Ubuntu Server 18.04
- Ubuntu Server 20.04
- Macbook Pro 13 (2019 Version)
- Windows 10
And in all my testing I have not been able to reproduce your issue.
Sorry, updated my question with Node: 12.18.4
Ill have to try to load this up on a Win10 VM and test. This is also while in yarn develop, not a production build.
Yeah if you can provide a sample project maybe in a GitHub repo I can clone locally to test also. Sorry I am really trying to reproduce this and I haven’t been able to.
Public repo, just need to update the postgres user/password in the database.js fiel.
Just cloned locally (Linux Mint 20) and set my PG user info, ran
Saw you defined the relation as oneWay and I swapped to
oneToOne and hit save, no issue. So this must specifically be environment based.
I’ve tried that relation as well and it fails for me just the same. So are we assuming this is specific to Win7 OS? The console error in cmd points to lodash in the bookshelf node_module.
It may not be specifically Win7, a few other stats from my environment:
PostgreSQL: PostgreSQL 12.4
Technically however, Windows 7 is not an OS we support (Considering not even Microsoft supports it anymore)
Something else we can compare is the resolved package versions from our lock files, here is my yarn.lock from your test project:
I compared my yarn.lock to yours and they are identical. Looks like the only thing different in your setup is the OS and the postgres version.
Im going to try to get a project loaded on a Windows 10 VM and see what happens
Ok, so i tried this on a brand new Windows 10 Pro VM. I loaded everything with the same versions as i have on my Win7 machine. I created a new strapi project from yarn create, and i get the exact same error as i do on the Win7 machine.
Could this be a Postgres version issue?
Quite possible, what version of PG are you using? The minimum accepted version is PG 10
I also tested the same Win10 VM, with postgres 12 and i get the same error.
I feel like its a dependency that is causing this issue, in bookshelf
I’m spinning up a fresh Windows 10 VM right now myself to confirm.
Any luck with replicating this issue?
Sorry I forgot to write back, I was not able to reproduce it on a fresh Windows 10 VM, using various PG versions (10, 12, 13)
Any way to debug this on my end? I would really like to use strapi but as of now its a no go…
I’m honestly at a wall myself at the moment, I’ve asked a few others to try and reproduce it with no success either. There is a flag that allows you to increase the default node stack-size but I don’t understand if that works, why your callstack is so low.
I tried to change the stack-size from an article on SO but im not sure if the stack-size is actually changed. Ive found no way to actually check what the size is:
For windows, using the same approach as User Daniel - Stack Overflow 's answer:
C:\Program Files\nodejs\node.exe to
C:\Program Files\nodejs\node.cmd with the following contents:
SET "NODE_EXE=C:\Program Files\nodejs\node_origin.exe"
echo Running node with '--stack-size=4096'
"%NODE_EXE%" "--stack-size=4096" %*
But that also had no affect on my issue. I’m at a loss here.