Giter VIP home page Giter VIP logo

Comments (6)

libern avatar libern commented on September 4, 2024

have you done php artisan passport:install?

from someline-starter.

ztzhu2012 avatar ztzhu2012 commented on September 4, 2024

When I run this piece of code, it displays message:

Encryption keys generated successfully.
Personal access client created successfully.
Client ID: 1
Client Secret: pLf0kt54KAUPn3R5ON6AryWTcM1NzUOhVuZiAmyG
Password grant client created successfully.
Client ID: 2
Client Secret: q0UGyoSRjU1RXc0K4fhpB9Cdjyz7iMgfNv3SL4nb

but test function testGetAllUsers() error:

D:\wamp\bin\php\php7.0.4\php.exe -ddxdebug.remote_enable=1 -ddxdebug.remote_host=127.0.0.1 -ddxdebug.remote_port=9001 -ddxdebug.remote_mode=req D:/Works/PHP/someline-starter/vendor/phpunit/phpunit/phpunit --no-configuration --filter "/::testGetAllUsers( .*)?$/" UserTest D:\Works\PHP\someline-starter\tests\Api\UserTest.php --teamcity
Testing started at 1:27 ...
PHPUnit 5.6.5 by Sebastian Bergmann and contributors.


Failed to get access token for grant type [password]!
 D:\Works\PHP\someline-starter\vendor\someline\rest-api-client\src\Someline\Rest\RestClient.php:357
 D:\Works\PHP\someline-starter\vendor\someline\rest-api-client\src\Someline\Rest\RestClient.php:401
 D:\Works\PHP\someline-starter\vendor\someline\rest-api-client\src\Someline\Rest\RestClient.php:412
 D:\Works\PHP\someline-starter\tests\Api\BaseApiTestCase.php:52
 D:\Works\PHP\someline-starter\tests\Api\UserTest.php:14

--------
REST CLIENT SERVICE: local, ENVIRONMENT: dev
REST CLIENT BASE URI: http://someline-starter.app/

Response STATUS CODE is 401:
Array
(
    [error] => invalid_client
    [message] => Client authentication failed
)


Time: 1.69 seconds, Memory: 12.00MB


ERRORS!
Tests: 1, Assertions: 0, Errors: 1.

Process finished with exit code 2

I change OAuthTest.php

        'client_id' => '1',
        'client_secret' => 'pLf0kt54KAUPn3R5ON6AryWTcM1NzUOhVuZiAmyG',

The same error occurs, but change

        'client_id' => '2',
        'client_secret' => 'q0UGyoSRjU1RXc0K4fhpB9Cdjyz7iMgfNv3SL4nb',

run PHPUnit is OK.


Other, i run code php artisan migrate --seed to 1071 error. So I change 2014_10_12_100000_create_password_resets_table.php

        $table->string('email',50)->index();
        $table->string('token',200)->index();

from someline-starter.

geoidesic avatar geoidesic commented on September 4, 2024

I can't figure out how to run the tests. I followed the YouTube video but it's not clear how you got the test to run. You did a bunch of things very quickly which I can't follow. When I click on the Run button it tries to open the test file in a browser window.

from someline-starter.

geoidesic avatar geoidesic commented on September 4, 2024

I did run php artisan passport:install but I still get errors:

RuntimeException: Failed to get access token for grant type [password]!

... and ...

Response STATUS CODE is 401:
Array
(
    [error] => invalid_client
    [message] => Client authentication failed
)

from someline-starter.

geoidesic avatar geoidesic commented on September 4, 2024

So here's a very specific example of one problem with the phpunit tests. If you disable all the tests except for the Feature tests (by commenting out other testsuite nodes phpunit.xml), then run phpunit it shows an error of Expected status code 200 but received 302. I'm running phpunit from the docroot on the vagrant instance. PHPUnit 5.7.17

I've also tried curl -v 192.168.10.10 from both the vagrant shell and my local shell. The headers show 302 Found. Could this be an nginx config issue? Or it may have something to do with the routes/ folder but I'm not sure exactly what.

Any ideas how to fix this error?

from someline-starter.

Muhammadinaam avatar Muhammadinaam commented on September 4, 2024

Hi, this is a nice package but I think that the developers have stopped working on it. Maybe you can try this package: https://github.com/Muhammadinaam/speed-admin. It supports Laravel 8+.

from someline-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.