EBUSY: resource busy or locked, open - discord

So im making a discord bot and this error showed up:
Unhandled rejection: Error: EBUSY: resource busy or locked, open 'C:\Users\theno\OneDrive\Dokumente\Discord\Bots\FNFA\FNFA\BotFiles\BotData\variables\servervars.json' at Object.openSync (node:fs:582:3) at Object.writeFileSync (node:fs:2143:35) at Object.module.exports.Message_Handle (C:\Users\theno\OneDrive\Dokumente\Discord\Bots\FNFA\FNFA\BotFiles\Handlers\Message.js:33:8) at processTicksAndRejections (node:internal/process/task_queues:96:5)
Anyone knows how to fix this?

The error is what it says: the file is busy or locked. This is likely due to you placing the bot folder inside of your OneDrive, which is known to cause these problems sometimes. Try moving the folder out of your OneDrive and trying again.
As a side note, you probably shouldn't use JSON if you're going to modify it frequently. Constantly parsing and dumping JSON from/into a file will cause more resource usage, won't scale well, and will cause issues if you make requests in quick succession. Instead, you should consider using a database system (e.g. MongoDB, MySQL, etc.)

Related

Topaz Workbench error message: 92003: An error occurred while writing data to the channel

While Topaz Workbench is starting the error message "92003: An error occurred while writing data to the channel" shows up. That is making one of my configured repository to not be listed there. How to resolve it?
Message:
What resolved my case, as a workaround, was to verify the amount of fa_commgr.exe processes in the Task Manager (I am using Windows 10), kill all of them, and then start Topaz again, this way it started normally (without that error message), and my repository was listed again.
Task Manager and fa_commgr.exe process instance (there were 4 instances I don't know why... yet):
My repository was listed again:

Permission denied error from loader on Windows

I have been getting this error for the past few weeks while programming in C. I'm confused on how to fix this since the error doesn't tell me where the error is coming from. Why can the compiler not open the output file?
Your bonus.exe file is busy due to some reason. Create a new project and try. Seems like you are working on Visual Studio. Close the application and reload also can fix your issue. This is not compilation issue rather build and link issue while it try to create bonux.exe second time it failed because your previous bonus.exe file is still busy. Also go to task manager and try to kill bonus.exe. That will also fix your issue.

Realm Runtime Error

I recently upgraded to Swift 2.0 and now I have been experiencing problems with realm. Most recently, I am experiencing an issue where the app instantly crashes when it reaches the first occurrence of a "try! Realm()" resulting in this error:
fatal error: 'try!' expression unexpectedly raised an error: Error
Domain=io.realm Code=2 "open() failed: No such file or directory"
UserInfo={NSFilePath=/Users/XXXXX/Library/Developer/CoreSimulator/Devices/7299DF18-E7D5-4499-93DD-A5035FB48E67/data/Containers/Data/Application/BED64819-5895-407F-9E90-9888741E24EB/Documents/default.realm,
NSLocalizedDescription=open() failed: No such file or directory, Error
Code=2}: file
/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-700.0.59/src/swift/stdlib/public/core/ErrorType.swift,
line 50 (lldb)
I saw one other post somewhat related to this, but it did not help because I am not trying to call the path directly, it is just throwing this error.
Thank you
When you use try! in Swift, you're choosing to ignore errors that you could otherwise recover from.
In this case, the Realm initializer is marked as throws. Here's an excerpt from Realm's docs on Error Handling:
Like any disk IO operation, creating a Realm instance could sometimes fail if resources are constrained. In practice, this can only happen the first time a Realm instance is created on a given thread. Subsequent accesses to a Realm from the same thread will reuse a cached instance and will always succeed.
To handle errors when first accessing a Realm on a given thread, use Swift’s built-in error handling mechanism:
do {
let realm = try Realm()
} catch let error as NSError {
// handle error
}
Same thing happened to me when I manually deleted an object from Realm via Realm browser.
Here are my two cents: Deleting realm.lock and other log files and relaunching an app worked for me. Take a look at the screenshot:

DotNetNuke Modifying Digital Assets Manager

I am looking to extract Digital Assets Manager / Management module (DAM) from source distribution of DotNetNuke 7.3.1 platform which is to be compiled into a separate module so that I can do some modifications to suit certain use cases.
What I have done:
I copied DigitalAssets module into fresh copy of local dev environment (DNN 7.3.1)
I changed all namespaces (I didn't bother renaming file names)
I used DotNetNuke.Modules.DigitalAssets.csproj to get VisualStudio sln
I cleaned out virtual directories and apps from IIS
I fixed other issues with libraries that were throwing errors
I got it to compile and produce a .dll with a different name to original module
So, now when I throw this module on a page (in theory) I should expect exactly the same behaviour as the original DigitalAssets module that came with framework.
But it doesn't behave the same.
In fact it appears to be refreshing the page like it is stuck in an infinite loop.
It doesn't load any documents either.
It doesn't load Digital Assets Management Settings tab either.
Original DigitalAssets module works just fine.
I have noticed a POST error in console window of the form:
JQMIGRATE: Logging is active jquery-migrate.js?cdv=23:21
POST http://devsite1.me/DesktopModules/DigitalAssets/API/ContentService/GetFolderContent 401 (Unauthorized) - jquery.js?cdv=23:8526
send - jquery.js?cdv=23:8526
jQuery.extend.ajax - jquery.js?cdv=23:7978
loadFolder - dnn.DigitalAssets.js?cdv=23:1492
loadFolderFirstPage - dnn.DigitalAssets.js?cdv=23:1437
loadInitialContent - dnn.DigitalAssets.js?cdv=23:1431
gridOnGridCreated - dnn.DigitalAssetsController.js?cdv=23:47
gridOnGridCreated - dnn.DigitalAssets.js?cdv=23:205
(anonymous function) - jquery.js:9597
Telerik.Web.UI.RadWebControl.raiseEvent - jquery.js:9597
(anonymous function) - jquery.js:9597
Telerik.Web.UI.RadGrid.initialize - jquery.js:9597
Sys.Component.endUpdate - jquery.js:9597
Sys.Component.create - jquery.js:9597
(anonymous function) - My-DAM?folderId=41&view=gridview&pageSize=10:1154
(anonymous function) - jquery.js:9597
Sys._Application._raiseInit - jquery.js:9597
Sys._Application.initialize - jquery.js:9597
b - jquery.js:9597
document.addEventListener.a - jquery.js:9597
Interesting to note that I am not getting any other errors or event logs. These anonymous function calls make me worried.
It appears to me I missed something important. Any help with this is greatly appreciated.
EDIT 1:
Found this error within loadFolder - dnn.DigitalAssets.js?cdv=23:1492
An error occurred while loading the folder content
An error caused by ajax call to /DesktopModules/DigitalAssets/API/ContentService/GetFolderContent service. Problem with this is its actually pointing to the original DigitalAssets module and not the one I am working on. So, this has to change.
Status 401 Unauthorized didn't get fixed.
EDIT 2:
Upon further investigation I have found GetFolderContent() function in ContentServiceController.cs which in turn supposed to return an object with folder structure.
[AllowAnonymous] on this function didn't make Status 401 go away either.
EDIT 3:
Changing url to anything other then /DesktopModules/Module_Name/API/ContentService/GetFolderContent causes ajax call throw Status 404 Not Found and display error dialog An error occured while loading the folder content. Not Found.
Which I hope means that the ajax call actually gets to GetDolderContent() and back. As to why it comes back with Status 401 is still under investigation.
EDIT 4:
OK, there seems to be an issue with the way I got the module to build in Visual Studio. Tried building it in Release mode and while it build successfully I didn't get my install and packages folders packed with all important goodness.
EDIT 5:
All work trying to take ownership of this module has been suspended for the time being. I have managed to get it to compile in place of the original DigitalAssets module which was fairly easy. But now it's pulling DotNetNuke.Web.dll (or File Uploader to be more specific) after itself.
Getting DotNetNuke.Web to compile was exactly the same process which is fairly straight forward. But now I am trading upgradability of the platform in more than one place. Which I don't particularly fancy.
Just to close off the question the conclusion as follows.
The project; Digital Assets Manager takeover has been put on hold. At the time there wasn't enough knowledge of DNN inner workings that would allow me to progress without wasting too much time.
For now I ended up modifying the core module (not ideal). In the future when I have less things that need to be done ASAP I will definitely revisit this idea.

AMDeviceValidatePairing failed

While using Fruitstrap (or some other tools which uses MobileDevice.h) for installation of apps, we come across this error:
AMDeviceValidatePairing failed
How to solve this in MAC?
So if you are using fruitstrap, it actually uses MobileDevice.h for accessing the MobileDevice.framework. MobileDevice.framework is actually contacting iTunes and doing the required process. In between it opens up a process and fails to terminate:
/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/Resources/usbmuxd -launchd
On terminating this process, it will solve the problem and AMDeviceValidatePairing will succeed.
I encountered the same error in fruitstrap.
My problem was that iTunes was not authorized to access data from my mobile(since I had just update to 7.1.1).
So I opened iTunes once, gave authorize in the dialog which opened. In the device a popup asked me if I wanted to "Trust this computer". Once I gave yes, I got this error no more.

Resources