Getting 403 when register new user in Address Book on Local


#1

Hi guys,

I was finally able to run the Address book for Javascript, there’s something wrong with the URL you provide. When I select the app to be “On a provisioned file storage service.” the URL I get is the following: http://localhost:4000/files/AddressBookForJavaScript/add_javascript/index.html this URL will give me an error, however if I remove files from the URL it works, this one work fine: http://localhost:4000/AddressBookForJavaScript/add_javascript/index.html

Now When I create a new user I get this error:
403 Access Forbidden.

And this is the message I get:

{“readyState”:4,“responseText”:"{“error”:{“context”:null,“message”:“Access Forbidden.”,“code”:403,“trace”:[“0 [internal function]: DreamFactory\\Http\\Middleware\\AccessCheck->handle(Object(Illuminate\\Http\\Request), Object(Closure))”,“1 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“2 [internal function]: Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))”,“3 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9535): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))”,“4 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8892): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))”,“5 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8877): Illuminate\\Routing\\ControllerDispatcher->callWithinStack(Object(DreamFactory\\Http\\Controllers\\RestController), Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request), ‘handleGET’)”,“6 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7831): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request), ‘DreamFactory\\\\Ht…’, ‘handleGET’)”,“7 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7802): Illuminate\\Routing\\Route->runWithCustomDispatcher(Object(Illuminate\\Http\\Request))”,“8 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7455): Illuminate\\Routing\\Route->run(Object(Illuminate\\Http\\Request))”,“9 [internal function]: Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))”,“10 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9553): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))”,“11 [internal function]: Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))”,“12 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9535): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))”,“13 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7456): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))”,“14 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7444): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))”,“15 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7429): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))”,“16 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2304): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))”,“17 [internal function]: Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))”,“18 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9553): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))”,“19 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/vendor/barryvdh/laravel-cors/src/HandleCors.php(43): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))”,“20 [internal function]: Barryvdh\\Cors\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))”,“21 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“22 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17932): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))”,“23 [internal function]: DreamFactory\\Http\\Middleware\\FirstUserCheck->handle(Object(Illuminate\\Http\\Request), Object(Closure))”,“24 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“25 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12881): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))”,“26 [internal function]: Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))”,“27 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“28 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(11504): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))”,“29 [internal function]: Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))”,“30 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“31 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12622): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))”,“32 [internal function]: Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))”,“33 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“34 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12561): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))”,“35 [internal function]: Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))”,“36 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“37 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2978): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))”,“38 [internal function]: Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))”,“39 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“40 [internal function]: Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))”,“41 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9535): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))”,“42 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2251): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))”,“43 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2234): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))”,“44 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/public/index.php(53): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))”,“45 {main}”]}}",“responseJSON”:{“error”:{“context”:null,“message”:“Access Forbidden.”,“code”:403,“trace”:[“0 [internal function]: DreamFactory\Http\Middleware\AccessCheck->handle(Object(Illuminate\Http\Request), Object(Closure))”,“1 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“2 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,“3 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9535): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,“4 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8892): Illuminate\Pipeline\Pipeline->then(Object(Closure))”,“5 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8877): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(DreamFactory\Http\Controllers\RestController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), ‘handleGET’)”,“6 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7831): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), ‘DreamFactory\\Ht…’, ‘handleGET’)”,“7 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7802): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))”,“8 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7455): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))”,“9 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,“10 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9553): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,“11 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,“12 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9535): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,“13 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7456): Illuminate\Pipeline\Pipeline->then(Object(Closure))”,“14 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7444): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))”,“15 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7429): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))”,“16 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2304): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))”,“17 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))”,“18 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9553): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,“19 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/vendor/barryvdh/laravel-cors/src/HandleCors.php(43): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,“20 [internal function]: Barryvdh\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))”,“21 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“22 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17932): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,“23 [internal function]: DreamFactory\Http\Middleware\FirstUserCheck->handle(Object(Illuminate\Http\Request), Object(Closure))”,“24 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“25 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12881): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,“26 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))”,“27 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“28 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(11504): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,“29 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))”,“30 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“31 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12622): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,“32 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))”,“33 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“34 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12561): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,“35 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))”,“36 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“37 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2978): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,“38 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))”,“39 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9545): call_user_func_array(Array, Array)”,“40 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,“41 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9535): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,“42 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2251): Illuminate\Pipeline\Pipeline->then(Object(Closure))”,“43 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2234): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))”,“44 /Applications/dreamfactory-2.0.1-0/apps/dreamfactory/htdocs/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))”,“45 {main}”]}},“status”:403,“statusText”:“Forbidden”}

And when I inspect the code, I see the following:

POST http:// localhost:4000/api/v2/user/session 401 (Unauthorized)k.cors.a.crossDomain.send @ jquery.min.js:4n.extend.ajax @ jquery.min.js:4$.extend.api.login @ functions.js:9(anonymous function) @ script.js:46n.event.dispatch @ jquery.min.js:3r.handle @ jquery.min.js:3
jquery.min.js:4 POST http:// localhost:4000/api/v2/user/session 401 (Unauthorized)k.cors.a.crossDomain.send @ jquery.min.js:4n.extend.ajax @ jquery.min.js:4$.extend.api.login @ functions.js:9(anonymous function) @ script.js:46n.event.dispatch @ jquery.min.js:3r.handle @ jquery.min.js:3
jquery.min.js:4 GET http:// localhost:4000/api/v2/db/table/contact_group?=1447818630142 403 (Forbidden)k.cors.a.crossDomain.send @ jquery.min.js:4n.extend.ajax @ jquery.min.js:4$.extend.api.getRecords @ functions.js:70$.extend.route @ route.js:58(anonymous function) @ script.js:68$.ajax.success @ functions.js:60j @ jquery.min.js:2k.fireWith @ jquery.min.js:2x @ jquery.min.js:4(anonymous function) @ jquery.min.js:4
jquery.min.js:4 GET http:// localhost:4000/api/v2/db/table/contact_group?=1447818630143 403 (Forbidden)k.cors.a.crossDomain.send @ jquery.min.js:4n.extend.ajax @ jquery.min.js:4$.extend.api.getRecords @ functions.js:70$.extend.route @ route.js:58loginHandle @ script.js:31$.ajax.success @ functions.js:20j @ jquery.min.js:2k.fireWith @ jquery.min.js:2x @ jquery.min.js:4(anonymous function) @ jquery.min.js:4
jquery.min.js:4 GET http:// localhost:4000/api/v2/db/table/contact_group?=1447818630144 403 (Forbidden)

Sorry, had to add a space between http:// and localhost, the system does not allow me to have more than 2 URLs.

I’ve followed the Readme File and I’ve configurated the CORS as explained. What am I missing?