team-exor / eiquidus

Feature-rich open-source altcoin block explorer. Regular Updates ~ Platform Independent ~ Mobile Friendly ~ Supports Themes, Markets, Charts, Claiming Addresses, Public API's, Custom RPC Cmds, Bitcoin, Heavycoin, zk-SNARKs ~ List Masternodes, Network Peers, Top 100 Wallets ~ Built-in Update Script ~ Highly Customizable
https://explorer.exor.io
BSD 3-Clause "New" or "Revised" License
90 stars 186 forks source link

explorer not executing the /etc/getlasttxs/0 command after loading the main index page #28

Closed grigzy28 closed 1 year ago

grigzy28 commented 1 year ago

I setup the explorer, got the chain fully sync'd. The index page loads but just sits there with processing on the screen. I see in the console that it never runs the /ext/getlastaxs that it should be running according to index.pug. I have setup several iquidus explorers before and hadn't run into this so hopefully you can help guide me.

All other pages seem operational, it can get blocks/transactions/show peers/richlist...

The addnodes doesn't seem to work either thou...

ubuntu 22.04 nodejs 20.1 mongodb 6.0.5

rock'n'rain coin- pos

joeuhren commented 1 year ago

This is the first time I've heard of this problem. Are you getting any particular error msgs in the server console or in the console tab of the browser? I spun up a new environment that emulates your ubuntu, node and mongo versions and it works 100% with my coin.

I tried to do a quick test with rock'n'rain coin from https://github.com/RockNRain/RNRC/releases but I cannot find a proper wallet binary that I can just unzip and run, and I don't feel like spending hours building from source. If you are able to sync even 1 block though and see block and transaction data on other pages such as the movement page then the coin likely isn't the problem.

I cannot think of what setting could break the site like that but I suppose it's possible something got messed up in the config. You could try backing up your settings.json file and restoring a fresh copy from the settings.json.template and only changing the database and wallet setup at the top of the config to see if using the default settings works any better.

It's hard to say what could be wrong without more information. Please respond with any error msgs you see, screenshots, or anything else you feel that may help pinpoint the problem. If possible, try a couple different browsers from different computers to ensure there isn't something to your local computer that is interfering.

grigzy28 commented 1 year ago

This is interesting. I took the template and just changed the top 3 things, the explorerdb username/password, the coin rpc info and the coin name. It did work and read the stored blocks information. Not sure what I could've done to the settings, just turned off stuff that isn't applicable to POS coins. Just changing little by little now and it's still working. So far everything is working and it's laid out the way I want it. I'm attaching the old settings file minus the username/passwords. Maybe you can see something that I just don't. :) Only major difference I think is that I left the network difficulty chart enabled this time.

settings.txt

joeuhren commented 1 year ago

Thanks for sharing your settings file, I spotted the problem right away because of that. The problem was the quotes in the coin > name setting which was breaking some javascript functions because they weren't handling the quotes properly. What's interesting to me is how you were able to get it working if you still had quotes in the coin name. My guess is that you didn't include them the second time around otherwise your current install must still not be working very well.

I've posted a fix that will allow you to use quotes in the coin > name and/or symbol now: https://github.com/team-exor/eiquidus/commit/7f6c58525c9e487e8c1ebcae3296aa3ba05d8e18

Assuming you haven't made any custom changes to the explorer source code, you can merge the new updates with the cmd npm run update-explorer

Keep in mind the coin > name setting is used as a key value for pretty much all data in the database, so if you change that value after syncing, you will effectively lose your data and need to sync again.

I'll keep this issue open for a few days just in case you still notice problems after updating the code, but I think the latest commit should fix and prevent it from happening for you or anyone else from now on.

grigzy28 commented 1 year ago

You're right. The second time, I didn't expand the name and just put RNRC and RNRC as both the coin name/symbols. I will update and test with the new code.

grigzy28 commented 1 year ago

Sorry was away at a funeral. I am closing this as it all appears to be working correctly now.