Git Product home page Git Product logo

Comments (11)

AlbertMN avatar AlbertMN commented on May 19, 2024

Very fine issue - thank you for nailing the format! Try and open ACC with administrator rights - it looks like it has issues reading the file for some reason.

It'd also be helpful if you could try and close ACC and then execute some actions and take a screenshot of the Dropbox ACC-folder.

from assistantcomputercontrol.

Jynolis avatar Jynolis commented on May 19, 2024

Per your instruction here's screenshots of the following:
Quick note I changed the ACC folder location to Button/PC

  • The Dropbox ACC folder with ACC not running and applet ran:
    capture_001_04042019_003533

  • The Dropbox ACC folder with ACC running and applet ran:
    capture_002_04042019_003708

Always ran as Admin. plus I'm using the built-in admin account.

I noticed that ACC is instantly setting the .txt attribute hidden.
When ACC is not running- the .txt is not hidden.

I tested creating .txt files one hidden and another not hidden and manually moving them into the folder; ACC fails to read the hidden .txt while it does read and execute the one that's not hidden:

To test this I quickly unchecked the hidden attribute then deleted the file immediately and undid the deletion, only then ACC read it and simulator success:
capture_003_04042019_003756

Here is a new text log of that process from the moment ACC opened:

[AssistantComputerControl] Initiated.
Listening in: "C:\Users\Administrator\Dropbox\Button\PC" for ".txt" extensions
4/4/2019 12:35:43 AM: Checking for updates...
4/4/2019 12:35:44 AM: Software up to date
4/4/2019 12:35:54 AM: Send annonymous analytics; False
4/4/2019 12:35:54 AM: Posted user response
4/4/2019 12:35:54 AM: UID; 3de464a7cd9245af9e61faa2c1a2849c
4/4/2019 12:35:54 AM: Annonymous analytics are not being shared
4/4/2019 12:36:39 AM:
[ -- DOING ACTION(S) -- ]
4/4/2019 12:36:39 AM: - C:\Users\Administrator\Dropbox\Button\PC\computerAction.txt
4/4/2019 12:36:39 AM: - File exists, checking the content...
4/4/2019 12:36:39 AM: Could not read file.
4/4/2019 12:37:20 AM:
[ -- DOING ACTION(S) -- ]
4/4/2019 12:37:20 AM: - C:\Users\Administrator\Dropbox\Button\PC\computerAction.txt
4/4/2019 12:37:20 AM: - File exists, checking the content...
4/4/2019 12:37:20 AM: - Read complete, content: lock
4/4/2019 12:37:20 AM:
[EXECUTING ACTION]
4/4/2019 12:37:20 AM: - Test went through: lock
4/4/2019 12:37:20 AM: - Action: lock
4/4/2019 12:37:20 AM: - Parameter:
4/4/2019 12:37:20 AM: - Full line: lock
4/4/2019 12:37:20 AM:
SUCCESS: Simulated PC lock

4/4/2019 12:37:20 AM: Executing function; showSuccess
4/4/2019 12:37:20 AM: Non-fatal action. Deleting.
4/4/2019 12:37:20 AM: [ -- DONE -- ]

I've tried uninstalling ACC then also deleting the AppData/Local folder and the Registry entry Computer\HKEY_CURRENT_USER\Software\AssistantComputerControl then reinstalled a new v1.2.3. That still did not fix it

from assistantcomputercontrol.

AlbertMN avatar AlbertMN commented on May 19, 2024

I will send you a debug-version that outputs more of the "Could not read file" error later.

from assistantcomputercontrol.

Jynolis avatar Jynolis commented on May 19, 2024

Everything is working fine when using a Google Drive folder and the Drive button applet.

I can only guess the issue then is between Dropbox or its applets and ACC.

from assistantcomputercontrol.

AlbertMN avatar AlbertMN commented on May 19, 2024

Sorry it's taking so long. School is keeping me busy lately. Next week I'll definitely have it ready for you to debug :) Thanks for your patience.

from assistantcomputercontrol.

Jynolis avatar Jynolis commented on May 19, 2024

Take as long as you need. I'm using it with Drive meanwhile without issues.

Curiously I tried reinstalling Dropbox but that didn't fix it either.

from assistantcomputercontrol.

AlbertMN avatar AlbertMN commented on May 19, 2024

This is a 1.2.4-debug version with an open prompt. Try Dropbox again; this time it will give you the full error when it should say "Could not read file". Please send a screenshot or the log file here once tested :) Thanks for your patience.
ACCsetup.zip

from assistantcomputercontrol.

Jynolis avatar Jynolis commented on May 19, 2024

Got it:

[ -- DOING ACTION(S) -- ]
4/12/2019 11:37:47 PM: - C:\Users\Administrator\Dropbox\AssistantComputerControl\computerAction.txt
4/12/2019 11:37:47 PM: - File exists, checking the content...
4/12/2019 11:37:47 PM: Could not read file; System.IO.IOException: The process cannot access the file 'C:\Users\Administrator\Dropbox\AssistantComputerControl\computerAction.txt' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at System.IO.File.ReadAllText(String path)
at AssistantComputerControl.ActionChecker.ProcessFile(String file)

from assistantcomputercontrol.

AlbertMN avatar AlbertMN commented on May 19, 2024

Does this one help?
ACCsetup.zip

from assistantcomputercontrol.

Jynolis avatar Jynolis commented on May 19, 2024

Yes. it works every time after the retry.
Lock and shutdown.

[ -- DOING ACTION(S) -- ]
4/13/2019 6:00:02 PM: - C:\Users\Administrator\Dropbox\AssistantComputerControl\computerAction.txt
4/13/2019 6:00:02 PM: - File exists, checking the content...
4/13/2019 6:00:02 PM: File is in use, retrying
4/13/2019 6:00:02 PM: - Read complete, content: lock
4/13/2019 6:00:02 PM:
[EXECUTING ACTION]
4/13/2019 6:00:02 PM: - Test went through: lock
4/13/2019 6:00:02 PM: - Action: lock
4/13/2019 6:00:02 PM: - Parameter:
4/13/2019 6:00:02 PM: - Full line: lock
4/13/2019 6:00:02 PM:
SUCCESS: Simulated PC lock

4/13/2019 6:00:02 PM: Executing function; showSuccess
4/13/2019 6:00:02 PM: Non-fatal action. Deleting.
4/13/2019 6:00:02 PM: [ -- DONE -- ]

[ -- DOING ACTION(S) -- ]
4/13/2019 6:08:49 PM: - C:\Users\Administrator\Dropbox\AssistantComputerControl\computerAction.txt
4/13/2019 6:08:49 PM: - File exists, checking the content...
4/13/2019 6:08:49 PM: File is in use, retrying
4/13/2019 6:08:49 PM: - Read complete, content: shutdown: /s /f /t 0
4/13/2019 6:08:49 PM:
[EXECUTING ACTION]
4/13/2019 6:08:49 PM: - Test went through: shutdown
4/13/2019 6:08:49 PM: - Action: shutdown
4/13/2019 6:08:49 PM: - Parameter: /s /f /t 0
4/13/2019 6:08:49 PM: - Full line: shutdown: /s /f /t 0
4/13/2019 6:08:49 PM:
SUCCESS: Simulated shutdown

4/13/2019 6:08:49 PM: Executing function; showSuccess
4/13/2019 6:08:49 PM: Action was fatal action - won't delete just yet - renaming.
4/13/2019 6:08:49 PM: [ -- DONE -- ]

from assistantcomputercontrol.

AlbertMN avatar AlbertMN commented on May 19, 2024

Good. Closing issue - this fix will be present in update 1.2.4, which will be out soon!

For those wondering, this is (most likely) caused by the file-watcher firing two events per. action when using Dropbox. To make ACC work in all cases, an event-listener for file creation and file modified is set up. When Dropbox creates a file, it first creates it, then modify it to have the correct content. Google Drive creates the file with the content without modifying it though, and OneDrive is kind of an in-between - resulting in ACC having to listen for both, sometimes resulting in one action-file being attempted executed twice. Precautions have been taken to make sure actions aren't executed twice, resulting in this bug emerging.

from assistantcomputercontrol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.