I'm trying to write my first smart contract by copying code from a video online. The instructor could "Deploy" but for some reason I'm getting this error message even though the code is exactly the same.
It seems you have not compiled your contract. You can simply compile by clicking compile button available. Please refer to the image
Compile button Snap.
The area where this message is shown is where deployed contracts are listed. This is simply stating that you haven't yet deployed a contract.
In the contracts drop down, I see you do not have a contract selected. You'll need to select a compiled contract to deploy. If there aren't any, its because you haven't yet compiled one. You'll need to select a .sol file in the compiler panel, and run the compiler. Once complete, you should see the compiled contract in the drop down.
Once you hit deploy, assuming the selected contract deploys successfully, you'll see the contract listed here.
For me simply refreshing the page solved this issue.
this problem occurs when you don't compile the code. You need to compile it first and then the deploy button will appear
I can confirm if all else fails, refresh the page. I ran into the same issue and after refreshing the page everything was working correctly again. It was the first time I had ran into this issue, so I too was a little puzzled. I usually start a new browser session so it was not an issue before.
If you use Remix plugin on VsCode and encounter "Currently you have no contract instances to interact with" problem, correct your solidity version which version you wrote and compile it again.
Refreshing solves the issue after you have compiled.
Related
My goal is to make sure I have a stable process for handling extension updates. I'm about to release a new extension and have noticed that the background service worker goes stale. Here are the details:
My method of testing this lifecycle is by generating a new build artifact and drag-n-dropping it into the page chrome://extensions. I hope this is the way to test this lifecycle. But if not, I would be happy to hear the alternative.
Once I drag and drop, I open the background console to check for the correct version, but seems it lags behind. The only way to remedy this issue is by removing the extension completely and loading it back, this gives me the impression a regular user would experience the same issue.
The screenshot below describes the situation:
version 0.3.33 is currently installed
drag and drop new build version 0.3.34
after successful drag and drop, notice version is lagging with version 0.3.31
But the chrome.runtime.onInstall release accurately outputs the previous version
Furthermore, I took a look at the unpacked extension directory and the compiled code is accurate with the expected version
What I've done so far to troubleshoot, was to remove the extension completely. It does successfully update after a series of manifest.version updates, but then it goes stale. To be clear, all I do is update the version property of the manifest.json file and that seems to cause this issue
Any help would be greatly appreciated. In the meantime, I'll brush up on the architecture for service workers as it relates to chrome manifest v3. Thanks!
EDIT - Sunday, August 22 2021:
The latest development:
First of all, thanks woxxom for additional details to debug.
I've created an example project that demonstrates the problem with reproducible steps. Hopefully, this helps identify the problem but it does seem to point to a Chrome bug so I'll also report it on crbug.com
Github project: https://github.com/miguelespinoza/-v3-service-worker-update
Ultimately, what I've identified is that loading an iframe causes the service worker lifecycle to go "stale".
Looking at chrome://serviceworker-internals/?devtools, I've noticed that the extension includes two workers, that seems odd because I'd imagine only one should exist, the one in the background. This could mean nothing, but wanted to share that as well. one "Active worker" and one "Waiting worker"
Important Note: Service worker background events stop working. In my case, chrome.commands.onCommand or chrome.action.onClicked
I just started learning about Android development, so this one is a serious issue for me: I launch Android Studio (2.2.2, but had the issue since 2.2.1) on Win10, make a New project, just keep clicking Next without changing anything (selecting Empty Activity as the template), Finish, try to Run 'app' on my phone and consistently get this error:
Error while executing: am start -n "com.example.android.myapplication/com.example.android.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.android.myapplication/.MainActivity }
Error type 3
Error: Activity class {com.example.android.myapplication/com.example.android.myapplication.MainActivity} does not exist.
Error while Launching activity
Being a complete newbie who was just supposed to change some text in XML and run the app on a phone, I have no idea what to do or edit to make a pregenerated app actually work. I searched StackOverflow for a more general approach to these errors and tried:
Restarting AS/computer
Disabling InstantRun
Messing with Clean/Rebuild/Synchronize/Sync with Gradle
Deleting .gradle and .idea folders and Syncing with Gradle
Some other obscure shenanigans with build.gradle and AndroidManifest
Various combinations of the above.
... None of which worked (or affected the problem in any way, in fact).
Other observations:
The app isn't even installed (checked All apps, there isn't any com.example.android.myapplication or MyApplication app on my device)
On the development course forum, it was suggested that com.example.android.myapplication/com.example.android.myapplication.MainActivity should only read com.example.android.myapplication/MainActivity. So far I haven't been able to figure out how to change that.
Update 1 New attempted fixes (neither of which worked):
Specified activity directy in Run/Debug window.
Specified no activity whatsoever (doesn't show that error, but doesn't run anything either).
Did File/Invalidate Caches
Changed android.intent.category.MAIN to all-lowercase and back.
Added "category android:name="android.intent.category.DEFAULT"/" to Manifest
Update 2 Managed to run the app on emulator. It seems to be working there, so the error will likely be somewhere between AS and the phone (Android 5.1.1, API 22).
Developer options and USB debugging are on (confirmed the pop-up message, too)
Driver is up to date (AS can see the phone without problem)
Phone is on (and not asleep) while I'm trying to run the app
Any suggestions why the phone won't download and run the app?
In your manifest file edit
with android:name="com.example.android.myapplication.MainActivity"
Make sure that your code doesn't mean any nonsense and that it wouldn't cause the app to crash, which is sometimes the problem. Try finding a problem in code which could crash the app. Maybe in your crash log you can find what causes the crash. Good luck fixing that.
According with your error log I suppose you did not delete previously installed app. See my accepted answer on the same question for details.
Writing an android application. It has no errors when I run it on an emulator. But when I tried to build it to an apk file to test on a device, I get the following error.
com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:853)
at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:802)
at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:786)
at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:250)
at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:238).......
I seen one similar case raised here which mentions to "Wait till indexing is complete."But I am not sure what I am doing to even interfere with any indexing.
Tried on different computers. Same problem. The only thing I did different before I got this error was to add a dependency at gradle(app) for a RingButton and added that RingButton class to the project to modify it to what I wanted.
As I said it is working fine in emulator.
Just to test if that is indeed the isse, I deleted the class and removed the dependency but the issue is not resolved.
I think this can be solved by creating a new project and moving the files into the new one. Maybe the index is corrupt. But before that can you clear the cache ? in android studio if your prepared to lose some local history then try this:
and then chose invalidate and restart:
I was using Dropbox to constantly backup my project every now and then. So I would click my project and send to Dropbox. I was also instantly clicking run to run the app on my emulator at the same time. During this period, when I mouse over my Dropbox icon, there is an indication that it is "Indexing".
Based on previous answer "Wait till indexing is complete", I can only assume this Dropbox indexing interfered somehow.
Not exactly elegant but I copied each and every file in this project into a New Project and everything is working fine now and able to install the apk file. I didn't change anything so I believe there is some form of corruption in the old project.
I have written a clean app (Hello, World) which builds correctly using Debug|Simulator and Release|Simulator configurations. When I try to build using any of the Release configurations, it errors out, saying "No output".
Where do I start looking? (it can't get any simpler than Hello, World, can it?)
This is expected if you have built it with release mode and haven't used the provisioning license but the production one (Apple won't let you distribute across phones this way, you need to do it 'adhoc').
Try rebuilding with the provisioning license and it should deploy correctly.
I got that fixed (had moved Xcode into the Apps folder!)... now I'm getting a new message "unable to find output file". I have to go to work now, so I will update this when I get home. I have all the screen shots and will generate the output (-v -v -v) and send you the url's where you can find everything. By the way, this happens on Hello, World in addition to my first app.
Thank you so much for your help... I have been fighting this for over 3 weeks now, and really, really want to get my first app submitted.
I have created a feature and i am auto activating it whenever 'My Site' gets created.
I am activating it for the template SPSMSITEHOST.
This feature changes the Picture URL property of User Profile.
Now, the problem is my feature gets activated but it seems it does not execute the code by default and and does not change the picture URL property.
When i deactivate the feature and activate the feature again then feature works absolutely fine as expected.
P.S: I am facing this issue on Production server, surprisingly this work fine on Staging server , i mean the same code !!
Any help ??
Thanks.
Sounds like something becomes out of sync on your production environment. Could it be caused by load balancing?
Are you doing this through STSADM commands?
I would stick the following line after after each command:
stsadm -o execadmsvcjobs
This will make sure processing for previous commands is done before moving on.
If thats way off then I would think its something to do with:
a) The way you're activating the feature... if you're using feature stapling, are you sure that the latest version of your stapling mechanism is in place?!
b) Assuming you have some sort of feature receiver in your code behind. Are you sure there isn't an error occurring thats being hidden by a try catch? If there is then you need to see what the exception is...
If it works when you deactivate/activate the feature, that almost eliminates security issues.
Hope this helps..
After long investigating and search for this problem i tried to rearrange the features at package file depending on the features dependencies, it seems SharePoint activate these features one by one as it's arranged in the package file and this is worked for me :)