multiple instances of chrome app - google-chrome-app

Chrome app newbie here...
One of the first things I am trying to figure out is how to have multiple instances of a chrome app running at the same time.
Googling reveals numerous people asking how to 'prevent' multiple instances, and refer to adding a "singleton: true" in the launcher .js file. My apps are singleton already, and adding "singleton: false" seems to have no effect. Other references suggest that if an "id" is present, it will be forced as singleton. However, removing the id seems to have no effect for me, either.
Experimenting with the simple helloworld tutorial, which has neither an id: or singleton:, even this app only runs as a singleton.
I am launching the app with "google --load-and-launch-app=/home/me/helloworld". If I run that command multiple times, it simply brings the original app to the front and center.
If someone can explain how to make the tutorial run multiple instances, then hopefully I can apply that to the larger pre-existing project I'm starting to look at.

Related

Advice to fix 'No such module' issues for pods in Xcode project

I'm facing this No such module 'SomeModule' error in an XCode solution that I've inherited from some other developers. Initially the error is No such module 'ObjectMapper', but I find that if I swap the position of that line with the one below, it becomes No such module 'Alamofire'.
I've tried all the simple things suggested on this site (and others), making sure I'm opening the .xcworkspace file, deleting everything and re-installing (derived data, the whole Pods directory, etc.), updating cocoapods, etc.
I suspect that what's actually going on is that either the pods themselves aren't building, but for some reason the errors there are making their way to XCode's obtuse errors list, or that they are building but somehow not being linked correctly.
This is actually a project I've inherited from some other developers, so it's hard to know what weird or wonderful configuration they've done to break things. They are using an approach that I've not seen before where there's 3 build schemes for different environments (in this case Develop, Stage and Prod) then this kind of parent scheme for all the other three.
I've also tried going to 'Manage Schemes' then ticking the 'Show' checkbox for the Pods-Sunflower project. When I try to build just that project, I get a bunch of errors (mainly for Facebook, Google and Realm pods) that say things like:
Unable to load contents of file list: '/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-xcframeworks-input-files.xcfilelist'
I don't expect anyone will be able to provide me a set of steps on how to solve this issue (I mean, that would be great), but I am hoping that someone can help me find ways to just work out what the problem is here, like:
How can I verify that all the separate pods are actually building?
Is there some folder where I can see all the built pods?
When you get a No such module 'SomeModule' error, where is Xcode trying to find the modules (like, in the file system? where?)
Thanks. I know this is one of those perennial issues, appreciate any advice.
The solution which worked for me was:
First thing i do when i got project from another developer is make a copy of pods and completely delete following files
Podfile
Pods folder
Podfile.lock
xcworkspace
In case you already once use that same project try deleting derived data
After deleting pods, reinstall pods and open project and let xcode do indexing of your project and after indexing look left side where warnings and errors shows, In there sometime you just have to just click and update or convert whatever xcode suggesting.
Note: - Sometimes doing same thing doesn't work try changing sequence because its xcode sometimes become dumb. Also try restarting
Honestly in these situation all i do is hit and try.
But above steps generallt works for me.

Google Assistant Hello World Draft Project not updating

Very new to Google Actions. Testing out tutorial stuff.
I have tried this in a couple of test projects just to double check. After initial run of any project I do not get any updates on draft projects. No changes show up in draft projects for me for both simulator and real device.
Started new project
Even blank project has basic conversation telling you where to add things next.
Change text.
Notice prompt does not change in testing environment.
In below pictures I have changed the words "hello world" with "Hey Dude" for both fulfillment and console output. I would expect Testing Prompt to respond with "Hey Dude from fulfillment and Hey Dude from the console!" But it does not. Instead it does not reflect any recent changes.
I think there may be two slightly different (but sometimes related) issues going on here.
The first is that there are known problems with the simulator being slow to pick up on updates, or them not seeming to show up. The second has to do with making sure you're deploying changes from the build-in code editor.
I don't have a clear answer to the first problem, although I know they're looking into it. I find that I can make some changes and they may not be noticed, but I know they have been picked up if I see the "Your preview is being updated..." spinner appear. There are other spinners that sometimes appear, but unless it explicitly says that it is being updated - the updates aren't always picked up. (Sometimes they are, however.)
Usually, if I don't see this, I'll go back and force an apparent change (delete a character from a webhook handler name, then add it back) and go back to the simulator. In general, this time it will say it is updating.
If you're using the Cloud Functions editor, you need to do three things:
Save the changes. You'll do this by clicking the "Save Fulfillment" button, but this only saves it so you can leave the editor. It doesn't mean that the simulator has access to it yet.
Deploy the changes. This deploys your code to Cloud Functions so they can be run. Note in the illustration that it says the code is saved, but not yet deployed.
Wait till the changes are fully deployed. Deploying takes time, and until it is completed, it won't be available in the simulator. While deploying, it lets you know.
Once it has deployed, however, the message changes, and you the impacts should be available through the simulator (although you may still need to see the "being updated" message to be sure).
Remember, however, that you don't need to use the "Cloud Functions editor" in order to deploy a webhook. You can deploy a webhook on any web server where
The host is public (so has a public IP address that Google can reach)
It can handle HTTPS with a non-self-signed certificate
You can even deploy yourself to Cloud Functions for Firebase, which is the same service that the Actions Builder uses. This way you have the URL set once in the Actions Builder and, once it is set, you won't need to change it.
But you'll still be able to change your code by managing your own deployment separate from Actions Builder.

How to access electron app's current browserWindow?

I'm stuck on a particular point with my Electron app:
When I open the devTools, I call mainWindow.webContents.openDevTools() from the app's menu. It's working fine on mainWindow.
The problem appears on child windows, opened by window.open(): the app menu is still working on every window, but it always call mainWindow's devtools (which is normal, since I told it to do so), where I would like to get current window's ones.
So I wonder if there is a way to call something like currentWindow.webContents.openDevTools() ? I found nothing in the documentation nor on SO nor by googling, so I guess I might haev missed something.
Let me precise a few things:
I'm still a newbie with Electron
I have no control on the pages that are called in the app, I'm trying to use electron as a kind of "restricted browser" to ship with a PHP-based application
After a bit more reading, I just found out that BrowserWindow.getFocusedWindow() is exactly what I was looking for.
So in my app menu, I juste call BrowserWindow.getFocusedWindow().webContents.openDevTools(), and it works as I expected.

Start an application at system start without login

We have a new server running and we got some new programs doing import routines. So far so good... But there is one program that is put into autostart folder. So it doesn't run until admin logs in and it stops if we logout.
I'd like to put this one into a seperate session so it may work without any interaction by simply starting it with the task scheduler at startup. Is this the right way to do this? Is it safe if I log in later and log out?
Many thanks!
Edit: The applications shows as a symbol in the task bar if running, it can be configured by this. Anything I must know about this if I change?
Edit: It is not my application, I cannot rewrite it as a service.
I successfully added the application by using task schelduler on startup. Login and logout will not quit the application but no symbol is shown. Please add details to my side questions and I'll mark your answer as the accepted one.
Edit: Ended up using this one. If I have to configure, I stop the application in task manager and start it again by link. After that I quit the application and restart it by task scheduler manual start.
You need to run your program as a Windows Service. One way of doing it is using the sc.exe program:
> sc create <new_service_name> binPath= "c:\myapp\myapp.exe"
You can read about it here.
You need to separate your application in two.
To allow it to run without a user session, you need a windows service. That should handle all the background stuff. You can then register the service and set it to start when the system starts.
To allow it to have a UI, and show up in the notification area, you need a windows application. This will be in autostart as usual, and will communicate with the service - for example, over named pipes.
While it is still (barely) possible to run an UI application without a user session, it's only maintained for backwards compatibility, and already shows a lot of problems. It will likely be removed altogether in the future, because it breaks quite a few contracts. Do not rely on hacks like this.
I also used the task scheduler to create the application at system startup. It should be noted that if you want to use for mining, you have to disable an option in "settings" where it says that if the application lasts more than three days in a row it will end.
It really works wonderfully!
it is a old question but I recently solved in another way...
(before I was using a scheduled-task for startup but this gave me diverse problems with lots software...)
Some programs also for diverse reasons must be run at a user level... or even inside a specific user session...
So the best way I found was to use a tool like Sysinternal/Autoruns to program the auto-logon to a specific user (it is a registry setting)... and in the startup-folder of that user (or any other "autorun/autolaunch" task)... run a script that first locks the screen... and next runs the other intended programs... that will run under that user profile...
so you can choose a standard user or a administrator... or even launch programs from a standard user in adminsitrator mode...
I hope will help...
This "hack" solved me many problems with startup apps...
I could not get the "sc create" command to work. Instead I manually edited the registry using regedit. I added a new key in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services.
I used the following page to figure out required parameters and their values. Note that the names do not map.
https://learn.microsoft.com/en-us/windows-hardware/drivers/install/inf-addservice-directive
Old question, but for anyone that stumbles here. Use srvany to set the program as a custom service.
Note that when you do this with for example dropbox, googledrive, etc., you will need stop the service, then open the program normally to make changes like password, updates, etc.
below is a well enough intro.
https://www.iceflatline.com/2015/12/run-a-windows-application-as-a-service-with-srvany/
Download the tool kit here
https://www.microsoft.com/en-us/download/details.aspx?id=17657
Convert user application to Service and Register it using Regsvr32 or installutil.exe. It will start the service using SYSTEM user account. Which is a high privilege account.
Note : You can`t run any Window based application. Even a Message only window.

Process files crash unexpectedly

I am working on a project in Drools6. I have defined a few custom tasks using workitemhandler. When I create a new process file(*.bpmn file) and model it by adding my custom tasks and other inbuilt blocks, everything works fine in the beginning. But, if the complexity of the .bpmn flow diagram increase i.e, I add about 4-5 custom tasks, create sub-processes, add a few gateways etc, the program crashes and I will not be able to open my flow diagram again. It says there is a parse error.
I have tried reinstalling eclipse, but it still gives me the same error. I have not used exception handling in the java class of my custom tasks. Could this be why my program is crashing.
please guys, if anyone has come across a similar issue, let me know how you resolved it.
Thank you
it seems that for some reason your business process is corrupted and it cannot be opened by the editor. Do you have a previous version of your process? Try opening another process.
You can also try the web designer, which is usually more powerful than the eclipse one.
Regards