instapy-dashboard icon indicating copy to clipboard operation
instapy-dashboard copied to clipboard

Live Logs Doesn't Work

Open RaihanStark opened this issue 7 years ago • 9 comments

Everything is good! except live logs. It's just appear endlessly loading on my server

Linux Ubuntu 18.04

RaihanStark avatar Feb 15 '19 09:02 RaihanStark

double check the location of the Logs, InstaPy recently changed it.

converge avatar Feb 15 '19 21:02 converge

I think it all good... the path is {instapy root folder}/logs/{myaccountname}/general.log ... If it's incorrect path, why the Statistics is working

RaihanStark avatar Feb 16 '19 10:02 RaihanStark

by instapy root folder I mean the root folder, I can see that you're pointing to a specific log file.

In short, the dashboard will:

  1. load your root folder (eg: /home/converge/InstaPy)
  2. search log folder inside the root folder to send it back to Live Log
  3. load the database in root folder/db/instapy.db

That's why it's important to point the root folder.

converge avatar Feb 16 '19 11:02 converge

Yes... I set root folder correctly. It pointing to my InstaPy folder sir check my configuration: https://imgur.com/a/wEPDtqo .

p.s: I censored my DigitalOcean IP on the screenshot

RaihanStark avatar Feb 16 '19 13:02 RaihanStark

The setup is correct, I see that you're running InstaPy as root right? It's better to run it with a normal user.

In short, if you run "npm start" using a normal user, and /root/InstaPy/logs/your_username/general.log has a root owner, instapy-dashboard will try to load the log file that requires root permission.

converge avatar Feb 16 '19 14:02 converge

Same issue here. Im using it on my VServer and want to access the Page over the Internet. Can that be the Problem?

How to config the .env file for that case?

schoppi91 avatar Apr 23 '19 13:04 schoppi91

did the tests pass? npm run test You just need to add your server IP to allowed hosts list.

converge avatar Apr 23 '19 19:04 converge

Thank you for your fast reply. Yes the test passed and my servers domain and its public IP is under allowed host

NPM Test

root@vmd38042:/home/instapy/instapy-dashboard

 npm run test

 [email protected] test /home/instapy/instapy-dashboard
 NODE_ENV=test jest

 PASS  __tests__/integration/setup.test.js

 RUNS  __tests__/integration/gets.test.js
 PASS  __tests__/integration/gets.test.js (7.386s)
 Console

    console.log node_modules/sequelize/lib/sequelize.js:1118
      Executing (default): SELECT recActivity.rowid,
                     prof.id as profile_id,
                     prof.name,
                     sum(recActivity.likes) as likes,
                     sum(recActivity.comments) as comments,
                     sum(recActivity.follows) as follows,
                     sum(recActivity.unfollows) as unfollows,
                     sum(recActivity.server_calls) as server_calls,
                     strftime('%Y-%m-%d', recActivity.created) as day_filter
            FROM recordActivity as recActivity 
            LEFT JOIN profiles as prof ON recActivity.profile_id = prof.id
            GROUP BY day_filter, profile_id
            ORDER BY recActivity.created desc
    console.log node_modules/sequelize/lib/sequelize.js:1118
      Executing (default): SELECT 1+1 AS result


Test Suites: 2 passed, 2 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        8.785s
Ran all test suites.

.env File

# MacOS: /Users/your_user_name/InstaPy
# you can also check this information when running your quickstart.py,
# the first lines contains
# -> Workspace in use: "/Users/converge/InstaPy"
INSTAPY_FOLDER=/root/InstaPy
# if using only on localhost, keep it:
ALLOWED_HOSTS=http://testdomain.eu:3000 http://localhost:3000 http://93.xxx.xxx.xxx:3000
REACT_APP_API_ENTRY_POINT=http://localhost:3001

# basic setup, ok to keep it ->
# Node port
NODE_PORT=3001
# ReactJS Create APP port
PORT=3000

schoppi91 avatar Apr 23 '19 19:04 schoppi91

in your case, REACT_APP_API_ENTRY_POINT should be: REACT_APP_API_ENTRY_POINT=http://93.xxx.xxx.xxx:3001

converge avatar Apr 24 '19 12:04 converge