Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ulrichm's avatar

domian/register redirects to domain/undefined when submitted

Hi

After I have tried both ways to install laravel spark, I have the same problem every time I want to create a user: When I submit the register form, I get an NotFoundHttpException in RouteCollection.php line 161:

It seems that the routing doesnt work, because the response is NULL.

and spark redirects to /undefined I have googled and googled for many hours now.... Any ideas?

0 likes
13 replies
EventFellows's avatar

Are you sure all installatsion steps worked without any errors? Including gulp and all migrations? Does your DB have a users table?

kylehudson's avatar

I have the same issue, I followed the instructions to the T. No errors and all tables are there etc.

EventFellows's avatar

How does your routes.php file look? With this little information it is hard to have a qualified guess...

kylehudson's avatar
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', 'WelcomeController@show');

Route::get('/home', 'HomeController@show');
ulrichm's avatar

I have the same routes file and the users table is created. I install on windows 7 and I had some errors and I get this when running npm install

npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0. npm WARN optional dep failed, continuing [email protected] npm WARN optional dep failed, continuing [email protected] npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. npm WARN optional dep failed, continuing [email protected] npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead!f

I tried to fix the graceful-fs problem with npm intall graceful-fs, and the lodash problem with npm lodash, and then there are no errors when running gulp

And now I see that the code is not interpreted fully, since this {{ registerForm.errors.get('email') }} probably shouldnt be in the view:source ?:

        <span class="help-block" v-show="registerForm.errors.has('email')">
            {{ registerForm.errors.get('email') }}
        </span>
    </div>

I have now spent to days without any progess, so please help !

EventFellows's avatar

Well, maybe double check all the places you had to change after installation - config files, .env file, etc.

ulrichm's avatar

I think that something must be missing in the install for windows guide. I have tried on different machines and same error.

kylehudson's avatar

I am gonna try a fresh install on my Mac to see if it's still broken.

EventFellows's avatar

I have also installed in on Homestead on Win 7 and it does work. Can you confirm that Spark is installed at all and not only the laravel base? I remember some confusion about the needed API keys. There is the API key you get from Spark website itself and the API key from Github that you can create yourself after joining the private repository. But if there was an issue with the APIs key you should not have been able to install at all in the first place...

1 like
ulrichm's avatar

Could this be a Stripe issue? I do hoe du I completely remove the billing part? I am not going to use it

EventFellows's avatar

Well, maybe. But if you have not setup any billing plans, it really should not interact with stripe I believe.

I remember changing something for the stripe webhook - but not 100% sure where exactly it was.

It had something to do with the logic of the stripe webhook route that was inconsistent between webhook/stripe and stripe/webhook (If I remember corretly).

ulrichm's avatar

Solved: I have localized the problem. The reponse from the /register post was:

Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0 Warning: Cannot modify header information - headers already sent in Unknown on line <b

0 {"redirect":"/home"}

I set 'always_populate_raw_post_data' to '-1' in both php.ini and phpForApache.ini, restarted wamp AND now it works!

3 likes

Please or to participate in this conversation.