getnamingo / registry

Open-source domain registry platform. Revolutionizing ccTLD and gTLD management with Namingo.
https://namingo.org
MIT License
37 stars 9 forks source link

Fix ($content) must be of type Stringable|string, null given #50

Closed wvro-org closed 10 months ago

wvro-org commented 10 months ago

Testing Namingo on mac os on Astra Linux via Parallels.... Found this issue when creating and or checking domain....

Screenshot 2023-12-29 at 00 05 35

`Slim Application Error The application could not run because of the following error:

Details Type: TypeError Code: 0 Message: Pdp\TopLevelDomains::fromString(): Argument #1 ($content) must be of type Stringable|string, null given, called in /var/www/cp/bootstrap/helper.php on line 306 File: /var/www/cp/vendor/jeremykendall/php-domain-parser/src/TopLevelDomains.php Line: 50 Trace

0 /var/www/cp/bootstrap/helper.php(306): Pdp\TopLevelDomains::fromString()

1 /var/www/cp/app/Controllers/DomainsController.php(28): extractDomainAndTLD()

2 /var/www/cp/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponseArgs.php(36): App\Controllers\DomainsController->checkDomain()

3 /var/www/cp/vendor/slim/slim/Slim/Routing/Route.php(358): Slim\Handlers\Strategies\RequestResponseArgs->__invoke()

4 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\Routing\Route->handle()

5 /var/www/cp/app/Middleware/AuthMiddleware.php(21): Slim\MiddlewareDispatcher->handle()

6 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): App\Middleware\AuthMiddleware->__invoke()

7 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()

8 /var/www/cp/vendor/slim/slim/Slim/Routing/Route.php(315): Slim\MiddlewareDispatcher->handle()

9 /var/www/cp/vendor/slim/slim/Slim/Routing/RouteRunner.php(68): Slim\Routing\Route->run()

10 /var/www/cp/vendor/slim/twig-view/src/TwigMiddleware.php(115): Slim\Routing\RouteRunner->handle()

11 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Views\TwigMiddleware->process()

12 /var/www/cp/app/Middleware/ValidationErrorsMiddleware.php(19): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()

13 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): App\Middleware\ValidationErrorsMiddleware->__invoke()

14 /var/www/cp/app/Middleware/OldInputMiddleware.php(18): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()

15 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): App\Middleware\OldInputMiddleware->__invoke()

16 /var/www/cp/app/Middleware/CsrfViewMiddleware.php(26): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()

17 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): App\Middleware\CsrfViewMiddleware->__invoke()

18 /var/www/cp/vendor/slim/csrf/src/Guard.php(476): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()

19 /var/www/cp/bootstrap/app.php(224): Slim\Csrf\Guard->process()

20 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): Closure->{closure}()

21 /var/www/cp/routes/web.php(257): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()

22 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): Closure->{closure}()

23 /var/www/cp/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()

24 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process()

25 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()

26 /var/www/cp/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle()

27 /var/www/cp/vendor/slim/slim/Slim/App.php(183): Slim\App->handle()

28 /var/www/cp/public/index.php(5): Slim\App->run()

29 {main}

Go Back`

getpinga commented 10 months ago

Thanks. This seems to me like an undocumented step. Does it get fixed if you do:

cd /var/www/cp/bin
php file_cache.php
wvro-org commented 10 months ago

Yes that's fixed it... however when creating and or checking domain there's another errror... For example TLDs: .test .example.example.

Checking domain test.test is not available: Zone is not supported Checking domain test.example.example is not available: Zone is not supported it's show the same error even if you loged in admin or to registrar Example Registrar

getpinga commented 10 months ago

Try to create a contact and a host and let me know if all is ok there. If yes, we will debug the domain creation.

getpinga commented 10 months ago

Also, is the TLD you are trying to check domain in ,added to Registry -> TLDs menu? .test gets added by default, so if database import went well, should work.

wvro-org commented 10 months ago

Somehow it works only with .test tld it refuses to work even with .example tld.... so newly added tlds aren't working... Ofcourse TLDs are added to Registry -> TLDs menu... contact and hosts created to....

getpinga commented 10 months ago

Ok, I see now the issue, thanks. It should work as .test and .xx TLDs as example TLDs, all the rest it validates against ICANN lists. So .example will not work.

Please test for now with .test and .xx, and in the next few days I'll add ability to skip ICANN validation.

getpinga commented 10 months ago

If you need to add more test TLDs now, check #33 and you will see which file needs to be modified.

getpinga commented 10 months ago

Instruction to cache the initial TLD list added to the manual. Also added ability in the last commit to determine the test TLDs from config files.

If you experience further issues, please let me know.