I am trying to create a fork of pancakeswap/goosedefi. The project works when I check it out from github and start using yarn start.
As soon as I change the contract addresses, symbol, and ABI to match my new project, I get the following error:
"Uncaught (in promise) Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced"
The ABI matches the ABI generated by BscScan for the contract address.
Has anyone successfully forked PancakeSwap and gotten past this error?
I'm trying to fork It too and i've encountered the same error multiple time. You should check which function throw this error becouse the original cause can be a wrong farms or pools configuration. For example i've the same error throwed by useFetchBalances hooks and navigating through the stack i've seen that useCakeBnb/useCakeBusd cause the problem too, so i've configured pools and now It works fine.
I Hope that this can be helpfull for you
Related
We added new features to our data collection mobile application after two -three months of inactivity, only for the build to keep failing.
This is the stack trace
ll-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.
This is often due to inadvertently including a core library file
in your application's project, when using an IDE (such as
Eclipse). If you are sure you're not intentionally defining a
core class, then this is the most likely explanation of what's
going on.
However, you might actually be trying to define a class in a core
namespace, the source of which you may have taken, for example,
from a non-Android virtual machine project. This will most
assuredly not work. At a minimum, it jeopardizes the
compatibility of your app with future versions of the platform.
It is also often of questionable legality.
If you really intend to build a core library -- which is only
appropriate as part of creating a full virtual machine
distribution, as opposed to compiling an application -- then use
the "--core-library" option to suppress this error message.
If you go ahead and use "--core-library" but are in fact
building an application, then be forewarned that your application
will still fail to build or run, at some point. Please be
prepared for angry customers who find, for example, that your
application ceases to function once they upgrade their operating
system. You will be to blame for this problem.
If you are legitimately using some code that happens to be in a
core package, then the easiest safe alternative you have is to
repackage that code. That is, move the classes in question into
your own package namespace. This means that they will never be in
conflict with core system classes. JarJar is a tool that may help
you in this endeavor. If you find that you cannot do this, then
that is an indication that the path you are on will ultimately
lead to pain, suffering, grief, and lamentation.
1 error; aborting
:transformClassesWithDexForRelease FAILED
:transformClassesWithDexForRelease (Thread[Daemon worker,5,main]) completed. Took 11.045 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformClassesWithDexForRelease'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.dx.command.Main with arguments {--dex --verbose --force-jumbo --num-threads=4 --output /tmp/build8570106392456281219xxx/Application/build/intermediates/transforms/dex/release/0 --min-sdk-version 15 /tmp/build8570106392456281219xxx/Application/build/intermediates/transforms/proguard/release/0.jar}
You or one of the cn1libs you are using included a javax.xml package as part of the code. We migrated to build target 27 over the weekend and I'm guessing that Google made checks for this sort of problem more rigid.
I see a lot of keep statements in your build hints so I'm guessing this was done intentionally.
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:
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.
Let me state upfront that I truly appreciate any assistance on this issue.
I have a C# (2.0) application. This is relatively simple application that executes stored procedures based on an XML file that is passed as a command line parameter.
We use it as a tool to call different stored procedures. This application does some logging and for the most part works very well.
The application reads the stored procedure name and parameters from an XML file. It sets up a connection string and SQL Command object (System.Data.SqlClient.SqlCommand).
Then it runs the stored procedure with the ExecuteReader method.
Unfortunately on a handful of occasions this application has generated the following error:
“Application popup: StoredProcLauncher.exe - Application Error : The instruction
at "0x7c82c912" referenced memory at "0x00000000". The memory could not be "read”
This error has appeared on multiple servers so it must be a code issue.
It seems that when our production server rolls a certain number it belches out this memory error.
The problem is I don’t see this issue on development. I can’t replicate it so I’m stuck.
Is there any way to simulate this error. Can I fill up the memory on my local PC somehow to attempt to replicate this error?
Does anyone know some common coding issues that might result in an error like this?
Does anyone have some rope I can borrow?
One way to do this is to wrap the offending code in a try catch block and writing the stack trace and error message to the windows application event log, text file, email, etc.
This will give you some line numbers and additional information.
Also note, you may need to deploy this in debug mode or at least copy the .pdb file with the application exe/dll so it can get the debug symbols. Can't remember off the top of my head how that works, but I think when you deploy in release mode you may loose some valuable debug information.
The instruction at "0x7c82c912" referenced memory at "0x00000000"
This is an access violation:
An access violation occurs in unmanaged or unsafe code when the code attempts to read or write to memory that has not been allocated, or to which it does not have access. This usually occurs because a pointer has a bad value.
Why does your program have unmanaged/unsafe code? For doing what you described it needs no native code.
Alas, the code crashes and now is not the time to wonder how is ending up calling native code. To solve the issue you're going to have to catch a dump and analyze the dump. See Capturing Application Crash Dumps. There are tools that specialize in this, like breakpad. there are also services that can help you collect and track crashes generated from your app, like crittercism.com or AirBrake. I even created one for myself and made it public bugcollect.com.
I've got a crash in our app which I can't debug as one of our partners has seen fit to use truly horrible 'CodeMeter' to encrypt their DLL. CodeMeter licensing prevents all attempts to debug an app containing a CodeMeter encrypted DLL and even seems to cause MiniDumpWriteDump called from an unhandled exception filter to fail (this technique works without this DLL loaded). The crash only happens when the encrypted DLL is loaded into the process.
I'm going mad trying to debug this and establish whether it's the encrypted DLL that's crashing, and if so how I can provide adequate diagnostic information to our partner to solve this.
Any suggestions - perhaps some manual stack and module walking code I could call from my unhandled exception filter?
Does CodeMeter have build settings that will allow our partner to produce a build that is still encrypted and licensed but doesn't sabotage debugging so aggressively?
Just to be clear in case there's any doubt, I'm not trying to hack the licensing, just diagnose this crash.
I've used some stack walking code that works well that can be called from an SEH or unhandled exception filter by passing in the CONTEXT record passed to the exception filter.
The addresses in the stack and the potential addresses in the first few exception parameters can be interpreted using SymFromAddr in DbgHelp including the module handle. Add to that a log of the module file names and module handles for interpreting which DLLs the stack addresses relate to.
This particular crash was a Visual C++ exception. The type of the exception is revealed by looking up the address of one of the exception parameters using SymFromAddr.
Raymond Chen's blog has some code for finding the type of a Visual C++ exception from the exception parameters but I couldn't get this to work for me for some reason (probably my own error).