Homebrew RELEASE NSP Indexer

proconsule54

Well-Known Member
OP
Member
Joined
Nov 5, 2019
Messages
756
Trophies
1
Age
43
XP
2,710
Country
Italy
Changelog in dev branch:
  • Added the titleKey(hex) in Rom Info (it should be usefull for rom decryption with hactool or similar)
  • Removed PHP-GMP deps now only ssl is required
  • Added Enable/Disable in config.php for rename feature
Hope you all likes our project.
Enjoy!
 

proconsule54

Well-Known Member
OP
Member
Joined
Nov 5, 2019
Messages
756
Trophies
1
Age
43
XP
2,710
Country
Italy
Something i am working on, is a homebrew app for switch that check nsp indexer and match if installed titles have updates on server (or a more recent version is live) and other cool stuff

i don't know if i am realsing it, but if other people are intrested on it probably i will (open source :D )

2021082321103400.jpg


Keep add likes to it, i am cleaning code so release it will not too far
 
Last edited by proconsule54,

Ejec

Active Member
Newcomer
Joined
Dec 14, 2015
Messages
40
Trophies
0
XP
281
Country
Argentina
help. I was able to get it to work to install the games on the console, but I can't get it to load on the web page. It is normal, the project is not finished?
 

Ejec

Active Member
Newcomer
Joined
Dec 14, 2015
Messages
40
Trophies
0
XP
281
Country
Argentina
In the tinfoil application it works, it takes me with the games and lets me install them. Now if I place my IP address in a web browser lets me enter the page but it does not load the game list. If I can upload some photos in a while.
 

proconsule54

Well-Known Member
OP
Member
Joined
Nov 5, 2019
Messages
756
Trophies
1
Age
43
XP
2,710
Country
Italy
Ok now i understand, what Distro/webserver are you running? (using docker?)
Check the error log of webserver it should point you to an error if nothing showed up, paste here the log (small paste :D not the entire log just the errors)
 

Ejec

Active Member
Newcomer
Joined
Dec 14, 2015
Messages
40
Trophies
0
XP
281
Country
Argentina
Ok now i understand, what Distro/webserver are you running? (using docker?)
Check the error log of webserver it should point you to an error if nothing showed up, paste here the log (small paste :D not the entire log just the errors)

now I'm at work, when I get home I take a good look at it. Although I did not see any error or that the error is being saved somewhere. First, I was told that I could not create the CACHE folder because of the permissions, I gave it permissions, I believe it, I start the web but without any game to see. i am using apache2 and php on linux. or do you mean var / apache2 there the errors?

but in the folder where I put the web files no file is created. I only create the CACHE folder, inside the CACHE folder from what I saw you have to create a games.json file but it doesn't.
 

Ejec

Active Member
Newcomer
Joined
Dec 14, 2015
Messages
40
Trophies
0
XP
281
Country
Argentina
on debian apache logs(and php also) is in var log apache2 error.log

PHP:
[Tue Aug 24 07:07:08.800942 2021] [php7:error] [pid 5084] [client 192.168.0.95:50769] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:07:15.809428 2021] [php7:error] [pid 1560] [client 192.168.0.95:60424] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:07:24.635172 2021] [php7:error] [pid 1586] [client 192.168.0.95:55661] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(186): getMetadata()\n#1 /var/www/html/index.php(273): outputTitles()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:07:26.108138 2021] [php7:warn] [pid 1563] [client 192.168.0.95:52645] PHP Warning:  filemtime(): stat failed for ./cache/versions.json in /var/www/html/index.php on line 158, referer: http://192.168.0.87/
[Tue Aug 24 07:07:26.108371 2021] [php7:error] [pid 1563] [client 192.168.0.95:52645] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:07:28.749223 2021] [php7:warn] [pid 1561] [client 192.168.0.95:65160] PHP Warning:  filemtime(): stat failed for ./cache/versions.json in /var/www/html/index.php on line 158, referer: http://192.168.0.87/
[Tue Aug 24 07:07:28.749450 2021] [php7:error] [pid 1561] [client 192.168.0.95:65160] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:09:51.171471 2021] [php7:warn] [pid 1559] [client 192.168.0.95:63441] PHP Warning:  filemtime(): stat failed for ./cache/versions.json in /var/www/html/index.php on line 158, referer: http://192.168.0.87/
[Tue Aug 24 07:09:51.171739 2021] [php7:error] [pid 1559] [client 192.168.0.95:63441] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:10:23.329549 2021] [php7:warn] [pid 1560] [client 192.168.0.95:63748] PHP Warning:  filemtime(): stat failed for ./cache/titles.json in /var/www/html/index.php on line 158, referer: http://192.168.0.87/
[Tue Aug 24 07:10:23.329923 2021] [php7:error] [pid 1560] [client 192.168.0.95:63748] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:10:24.465259 2021] [php7:warn] [pid 1562] [client 192.168.0.95:55837] PHP Warning:  filemtime(): stat failed for ./cache/titles.json in /var/www/html/index.php on line 158, referer: http://192.168.0.87/
[Tue Aug 24 07:10:24.465521 2021] [php7:error] [pid 1562] [client 192.168.0.95:55837] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:10:41.143992 2021] [php7:warn] [pid 1586] [client 192.168.0.95:58970] PHP Warning:  filemtime(): stat failed for ./cache/versions.json in /var/www/html/index.php on line 158, referer: http://192.168.0.87/
[Tue Aug 24 07:10:41.144138 2021] [php7:error] [pid 1586] [client 192.168.0.95:58970] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:10:42.550151 2021] [php7:error] [pid 1561] [client 192.168.0.95:61737] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(186): getMetadata()\n#1 /var/www/html/index.php(273): outputTitles()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:10:43.312277 2021] [php7:warn] [pid 1563] [client 192.168.0.95:57652] PHP Warning:  filemtime(): stat failed for ./cache/versions.json in /var/www/html/index.php on line 158, referer: http://192.168.0.87/
[Tue Aug 24 07:10:43.312367 2021] [php7:error] [pid 1563] [client 192.168.0.95:57652] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:10:43.854711 2021] [php7:warn] [pid 1559] [client 192.168.0.95:50899] PHP Warning:  filemtime(): stat failed for ./cache/versions.json in /var/www/html/index.php on line 158, referer: http://192.168.0.87/
[Tue Aug 24 07:10:43.854873 2021] [php7:error] [pid 1559] [client 192.168.0.95:50899] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:10:44.041020 2021] [php7:warn] [pid 5084] [client 192.168.0.95:53341] PHP Warning:  filemtime(): stat failed for ./cache/versions.json in /var/www/html/index.php on line 158, referer: http://192.168.0.87/
[Tue Aug 24 07:10:44.041256 2021] [php7:error] [pid 5084] [client 192.168.0.95:53341] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/
[Tue Aug 24 07:10:44.211441 2021] [php7:warn] [pid 1560] [client 192.168.0.95:63577] PHP Warning:  filemtime(): stat failed for ./cache/versions.json in /var/www/html/index.php on line 158, referer: http://192.168.0.87/
[Tue Aug 24 07:10:44.211765 2021] [php7:error] [pid 1560] [client 192.168.0.95:63577] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/

--------------------- MERGED ---------------------------

I created myself in the cache folder the files titles.json, versions.json and now I see the list of games but without images, without version, etc.

PHP:
[Tue Aug 24 07:19:22.233182 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 205, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233201 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 205, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233219 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 208, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233237 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 208, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233433 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 215, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233454 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 215, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233621 2021] [php7:warn] [pid 1560] [client 192.168.0.95:55086] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /var/www/html/index.php on line 193, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233642 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 196, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233661 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 196, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233686 2021] [php7:warn] [pid 1560] [client 192.168.0.95:55086] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /var/www/html/index.php on line 197, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233736 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 202, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233756 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 202, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233774 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 203, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233792 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 203, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233811 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 204, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233829 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 204, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233847 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 205, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233865 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 205, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233884 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 208, referer: http://192.168.0.87/
[Tue Aug 24 07:19:22.233902 2021] [php7:notice] [pid 1560] [client 192.168.0.95:55086] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/index.php on line 208, referer: http://192.168.0.87/
 
Last edited by Ejec,

Ejec

Active Member
Newcomer
Joined
Dec 14, 2015
Messages
40
Trophies
0
XP
281
Country
Argentina
delete titles.json and versions.json, be sure that cache folder is writable (a chmod 766 should work)

If I delete the files titles.json, versions.json does not appear anything on the web, nor does it allow me to click the update metadata button. when adding those two files on my own it lets me give the update metada and it creates the games.json file.

I have the permissions in 777
upload_2021-8-24_7-32-7.png
 

proconsule54

Well-Known Member
OP
Member
Joined
Nov 5, 2019
Messages
756
Trophies
1
Age
43
XP
2,710
Country
Italy
Code:
[Tue Aug 24 07:10:41.144138 2021] [php7:error] [pid 1586] [client 192.168.0.95:58970] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/

curl ins't installed as php extension

delete all the json in cache folder

do an apt-get install php-curl and it should works (with sudo if you are not root)

without curl it can't download the database json used to match nsp and xci infos
 
Last edited by proconsule54,

Ejec

Active Member
Newcomer
Joined
Dec 14, 2015
Messages
40
Trophies
0
XP
281
Country
Argentina
Code:
[Tue Aug 24 07:10:41.144138 2021] [php7:error] [pid 1586] [client 192.168.0.95:58970] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /var/www/html/index.php:142\nStack trace:\n#0 /var/www/html/index.php(159): getMetadata()\n#1 /var/www/html/index.php(286): refreshMetadata()\n#2 {main}\n  thrown in /var/www/html/index.php on line 142, referer: http://192.168.0.87/

curl ins't installed as php extension

delete all the json in cache folder

do an apt-get install php-curl and it should works (with sudo if you are not root)

without curl it can't download the database json used to match nsp and xci infos


PHP:
[Tue Aug 24 07:54:29.259005 2021] [php7:error] [pid 1559] [client 192.168.0.95:64994] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /var/www/html/index.php on line 151, referer: http://192.168.0.87/
[Tue Aug 24 07:54:43.413652 2021] [php7:error] [pid 1557] [client 192.168.0.95:62024] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in /var/www/html/index.php on line 151, referer: http://192.168.0.87/
[Tue Aug 24 08:00:04.729622 2021] [php7:error] [pid 1593] [client 192.168.0.95:51373] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /var/www/html/index.php on line 151, referer: http://192.168.0.87/
[Tue Aug 24 08:00:08.327100 2021] [php7:error] [pid 1563] [client 192.168.0.95:49443] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/index.php on line 151, referer: http://192.168.0.87/
[Tue Aug 24 08:03:53.232424 2021] [php7:error] [pid 1648] [client 192.168.0.95:58399] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /var/www/html/index.php on line 151, referer: http://192.168.0.87/

it did work for me. I installed what you told me, I also had to activate php-curl the in php.ini and configure some memory values in php.ini and that's it. Thank you very much, very good job, I loved him so much, that's why I insisted a lot :)

--------------------- MERGED ---------------------------

I think everything is working, looking now if everything is ok. anything that doesn't work will let you know.
upload_2021-8-24_8-14-33.png
 
  • Like
Reactions: proconsule54

proconsule54

Well-Known Member
OP
Member
Joined
Nov 5, 2019
Messages
756
Trophies
1
Age
43
XP
2,710
Country
Italy
Good, memory limit is due to the size of titles.json that exceed the php default limit

Glad to know you like it, keep in mind that is in active development so all newest feature will be in dev branch before merged to master
 
  • Like
Reactions: Ejec

Ejec

Active Member
Newcomer
Joined
Dec 14, 2015
Messages
40
Trophies
0
XP
281
Country
Argentina
It may be that it does not load the data correctly on the web of the story weighing the game.

There are already several games that I notice that they weigh 10gb and on the web it says 1gb

EXAMPLE:

GRIP Autosport
Base: 4.9 GB
Update: 107 MB
WEBSEVER
Base: 734 MB
Update: 105 MB
 

Ejec

Active Member
Newcomer
Joined
Dec 14, 2015
Messages
40
Trophies
0
XP
281
Country
Argentina
NSP or NSZ files?

I did not look at all the games, in GRID Autosport I have it in NSZ format, but the values that I passed to you above are in NSZ format.

Another game I saw the same was on DOOM.

DOOM Eternal - NSZ
Base: 14.8 GB
Update: 5.77 GB
WEBSEVER
Base: 657 MB
Update: 3.5 gB
 
Last edited by Ejec,

proconsule54

Well-Known Member
OP
Member
Joined
Nov 5, 2019
Messages
756
Trophies
1
Age
43
XP
2,710
Country
Italy
You are on a 32 bit system (os)?

keep in mind that nsz are compressed so file size differ from installed final size. I will work on a workaround to exstimate the final size, but for now it only show the file size
 
Last edited by proconsule54,

Ejec

Active Member
Newcomer
Joined
Dec 14, 2015
Messages
40
Trophies
0
XP
281
Country
Argentina
You are on a 32 bit system (os)?

keep in mind that nsz are compressed so file size differ from installed final size. I will work on a workaround to exstimate the final size, but for now it only show the file size

Tip: If you can make the original install size appear much better, not the compressed size. like aluminum foil does.

it is an ARM system.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    The Real Jdbye @ The Real Jdbye: ballcock