Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live Logs Doesn't Work #12

Open
RaihanStark opened this issue Feb 15, 2019 · 9 comments
Open

Live Logs Doesn't Work #12

RaihanStark opened this issue Feb 15, 2019 · 9 comments

Comments

@RaihanStark
Copy link

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

Linux Ubuntu 18.04

@converge
Copy link
Owner

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

@RaihanStark
Copy link
Author

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

@converge
Copy link
Owner

converge commented Feb 16, 2019

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.

@RaihanStark
Copy link
Author

RaihanStark commented Feb 16, 2019

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

@converge
Copy link
Owner

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.

@schoppi91
Copy link

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?

@converge
Copy link
Owner

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

@schoppi91
Copy link

schoppi91 commented Apr 23, 2019

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

 instapy-dashboard@0.3.0 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

@converge
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants