Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maximum setlocal recursion level reached for heroku in windows

enter image description here

I am trying to host a small app in heroku. The app is already up. Now when I was trying to push additional changes and hence logging; I am getting this error in my cmd.

The app is in laravel 5.4. I am running windows 10. And I am relatively new to hosting and heroku.

What might be the possible solution to the problem?

like image 550
md asiful haque Avatar asked Jan 02 '23 12:01

md asiful haque


2 Answers

I've had the same problem today and I think it is related to the automatic Heroku CLI update.

I managed to fix it by changing this file: %LOCALAPPDATA%\heroku\client\7.0.15\bin\heroku.cmd

On line 4 it was:

if not "%HEROKU_REDIRECTED%"=="1" if exist "%LOCALAPPDATA%\heroku\client\bin\heroku.cmd" (

and I changed it to:

if not %HEROKU_REDIRECTED%=="1" if exist "%LOCALAPPDATA%\heroku\client\bin\heroku.cmd" (

Basically when %HEROKU_REDIRECTED% was wrapped in double quotes first if statement always evaluated to true, causing recursion.

like image 80
Czarek Avatar answered Jan 05 '23 15:01

Czarek


Heroku posted an update and fix for this:

https://help.heroku.com/FMA2YNC8/heroku-cli-windows-v7-setlocal-recursion-error

The recursion error has been patched in version 7.0.13, however the bug may render earlier versions of the CLI unusable. To fix this, delete the CLI client folder at C:\Users\\AppData\Local\heroku\client then run heroku update.

like image 43
Groovy Pixel Avatar answered Jan 05 '23 16:01

Groovy Pixel