Debug on symbian - symbian

i am using trk for phone debug
it is working properly for Helloworld project
but it is showing error for my project when i start project in phone debug mode
1)Load failed
2)TrkProtocolPlugin:failed to download specified file to target
(please verify that target path is writable)
if any body understand what problem i am facing plz help me out from this problem
Thanks in advance

In your case, I would check:
if the application has correct privileges assigned (along with appropriate certificate)
if ID of the application is not in conflict with some other application on device
if installation package does not contain problematic commands (e.g. copy commands to non-accessible directories)

Can you manually install the application on the phone? That is the first test you must perform before even attempting to use TRK.
Also, can your application start, at least to the point of showing a panic? TRK cannot help you if the applications cannot even load its DLL dependencies due to for example Platform Security capability mismatch. TRK needs a process to attach too in order to do its job ...

Related

Error when enabling auto login of macOS app using a helper

I'm trying to have my app auto launch on login following Tim's tutorial: http://blog.timschroeder.net/2012/07/03/the-launch-at-login-sandbox-project/
I followed the instructions to the letter but I'm getting an error when I re-login to my computer as follows:
Jan 10 12:55:01 pc61 com.apple.xpc.launchd[1] (com.myApp.macgap.helper[25725]): Could not resolve CFBundleIdentifier specified by service: -10814: com.myApp.macgap.helper
Jan 10 12:55:01 pc61 com.apple.xpc.launchd[1] (com.myApp.macgap.helper): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
To outline:
I have my main app called "myApp" (ID: com.myApp.macgap )
In that app I have a helper app with ID: com.myApp.macgap.helper
When you launch the main app and go to preferences, you have an option to enable auto login (to fit to the Apple compliance rules)
I log out of my computer, log back in and look at the console to see what's going on (that's how I get the code above)
Another point worth mentioning, is when I do "Show package content" on the app and double click the helper app, it does launch the main app...
It all comes down to how launchd and launchctl work, as already answered, the regular use case often can be solved by reinstalling the app and ensuring the app is inside the applications folder. But there's another case that #byb is talking about, when this happens on your development machine – this can be caused by invalid launchd configuration.
When you run SMLoginItemSetEnabled it registers your bundle identifier along with other information in launchd service. At some point later, when your app changes, gets cleaned, or something else happens to it, which gets picked up by launchd, launchd may disable that particular login item. Apparently, sometimes this doesn't go smoothly, and consecutive calls with SMLoginItemSetEnabled will not work as expected or the agent / helper app simply won't launch.
The first thing to try is simply changing the bundle identifier for your launcher. If this solves the issue, try figuring out what's wrong with the original. Run launchctl print-disabled "user/$(id -u)" to display disabled services and login item associations. If the output contains your troubling bundle identifier – you are in luck.
I didn't find a way of removing disabled services by name using launchctl and had to do it by manually editing configuration files. Because they system-owned, you won't be able to simply click and edit, instead launch Xcode as root and remove the necessary references.
sudo /Applications/Xcode.app/Contents/MacOS/Xcode "/private/var/db/com.apple.xpc.launchd/loginitems.$(id -u).plist"
sudo /Applications/Xcode.app/Contents/MacOS/Xcode "/private/var/db/com.apple.xpc.launchd/disabled.$(id -u).plist"
Restart, run launchctl print-disabled "user/$(id -u)" to confirm removed items are no longer in the list. Try SMLoginItemSetEnabled again, hopefully now it will work as expected.
I had the exact same problem just now, and while looking for a solution found this (unanswered) question.
At least in my case, this desired functionality of the worked fine when I copied the app (exported from Xcode as a dev-id signed .app) to a fresh OS X install/account without all my development stuff on it. Of course it must also be in /Applications, as stated in the tutorial referred to in the question.
I am not sure why this feature of the app did not work on my development machine. Perhaps the problem could be due to some form of conflict with all the other near-identical copies of my app I have on disk (I have an archive of different versions of the app, plus the copies Xcode stores itself), all with the same bundle id of course.
Hope this helps in one way or another!
I had the same problem, removing other copies of app except one in /Applications solved the problem for me. To remove .app files generated by Xcode you can run Product->Clean.
I was struggling with this for hours. I had many apps with auto login but a new one just did not want to work.
Strangely this worked on the development machine:
Build App as normal
Move it to Application directory
Clean Xcode (CMD+k)!!
Enable auto login in the app.
Logout Login
I accidentally noticed that the system started the app (it tries in every 10 sec) when I clean Xcode :)
I can't find the duplicate copy but did find you can remove the service:
In a terminal window:
launchctl remove com.annoying.service
As it was already stated if there are more then one copies of service bundle on the machine launchd cannot resolve which one must be started by bundle identifier.
What I would recommend to you is find all copies of your service and then remove not desired ones.
For this you need to run following Swift code (It works even in Swift Playground):
import Cocoa
let bundleId = "com.your.bundleId"
let paths = LSCopyApplicationURLsForBundleIdentifier(bundleId as CFString, nil)
print("Available service instances by bundle id: \(paths)")
In my case it produces:
Available service instances by bundle id:
Optional(Swift.Unmanaged<__ObjC.CFArray>(_value: <__NSArrayI 0x6000002234a0>(
file:///Applications/MyApp.app/Contents/Library/LoginItems/MyService.app/,
file:///Users/igor/Library/Developer/Xcode/Archives/2017-12-27/MyApp%2027-12-2017,%2016.06.xcarchive/Products/Applications/MyService.app/
)
))
So I easely identified copy to be removed:
file:///Users/igor/Library/Developer/Xcode/Archives/2017-12-27/MyApp%2027-12-2017,%2016.06.xcarchive/Products/Applications/MyService.app/
Hope it help.
Assuming that you followed Tim Schroeder's recipe at: http://blog.timschroeder.net/2012/07/03/the-launch-at-login-sandbox-project/ :
What actually ended up working for me, was, in Xcode, to change my main project's build number from 1 to 2. I also tried a build number of 1000 and that worked fine as well.
In Xcode, select your main project target. Then, select the 'General' tab. If you see your Build is set to 1, change it to 2 and then rebuild, redeploy and see if that resolves the issue for you.
This was probably one of the screwiest bugs I have run into, in a while.

Using IOSleep in socket filtering kernel extension

I'm developing a kernel extension which processes every socket is build on system and waits in user space to get confirmation from user to allow or deny that socket.
I'm using IOSleep to apply the wait i mentioned above but it gives this error when loading kernel extension.
"the following symbols are unresolved for this kext:
_IOSleep"
First of all , i want to know am i correct about using IOSleep to make waiting ?
If not , how should i apply desired waiting to cover time interval that i need to get user confirmation about allowing or rejecting a specific socket connection?
Thanks in advance for any useful response.
IOSleep is perfectly fine in a kernel extension. The error you see is because libraries are linked to kexts at load time, not compile time.
When you add functions to your code that require linking against new libraries, you must call kextlibs on the compiled binary in order to find out what you need to add to the plist file. This is explained in the Add Library Declarations section of the Generic Kernel Extension tutorial in the Mac Developer Library, but it's easy to forget to do this after the first time.
The basic steps are:
Build your kext
Run the command kextlibs -xml MyKext.kext in the Terminal
Replace the <key>OSBundleLibraries</key><dict>...</dict> part of your kext's Info.plist file with the printout from the above
Rebuild your kext
It should now link correctly when you load it with kextload.

Deploying ClickOne application with network share

We have a server PC and other client PCs working connected to server using LAN. We have a application for our internal use which is developed using VB.Net. I used steps in http://www.codeproject.com/Articles/17003/ClickOnce-Quick-steps-to-Deploy-Install-and-Update to deploy clickone statergy for updating our application.After publishing while installing application,this error is coming
I searched i details and found this error
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of D:\Desktop\publish\Global.application resulted in exception. Following failure messages were detected:
+ Downloading file:///D:/Desktop/publish/Application Files/Global_1_0_0_0/Global.XmlSerializers.dll.deploy did not succeed.
+ Could not find file 'D:\Desktop\publish\Application Files\Global_1_0_0_0\Global.XmlSerializers.dll.deploy'.
+ Could not find file 'D:\Desktop\publish\Application Files\Global_1_0_0_0\Global.XmlSerializers.dll.deploy'.
+ Could not find file 'D:\Desktop\publish\Application Files\Global_1_0_0_0\Global.XmlSerializers.dll.deploy'.
I have checked Application files in publish options and Global.XmlSerializers.dll is included. Anyone know why this is happening?
Is there any way to copy some extra files to installation folder(C:\Users\name\AppData\Local\Apps..) when installing or updating clickone application? Because we use some outside support files for our application. Is it possible?
Is there any way to pass argument to clickone application short cut,like passing argument to .exe shortcut("\Global.exe" ?/?customer?/?)?
EDIT:
This is how I published
I checked by giving network path for publishing folder location.But same error coming.
Here is application files included
As you can see Global.XmlSerializers.dll is included
It is looking for a file on the D: drive. It is unlikely that your users all have their D drive mapped to the same location. When you publish you should use the full path rather than mapped drive letters.
//Servername/shareddirectory/appdirectory
Does the install work for you?
Well, there no magic involved in ClickOnce: you can just look into the deployment folder - is the required file there or not?
If not, you need to change the settings in the Publish options for the required file. This message - in my experience - is always a sign that one of the required assemblies has not been published.
In addition it seems that you published to a mapped network drive instead of publishing to an UNC path. You need to publish to a path following the \\server\name\ scheme.
When I have used the wizard and deployed to a network share, in the Publish Wizard:
Specify the location to publish this application:
UDP Path
Click Next
How will users install the application?
From a UNC path of file share
Specify the UNC path:
The same UDP Path (copy pasted from before)

Command /usr/bin/lipo failed with exit code 1 error

I have finally finished my app and I was getting ready to upload when this sudden error hit me and I have no idea what to do. I have checked other posts saying to change the code signing identity and I have done this but no luck. I tried every single option in the identity and no change. If anyone knows what is going on I would really appreciate it since I would simply just like to submit my app.
Here is what else it says in the erorr log:
/usr/bin/lipo: /Users/teddy/Library/Developer/Xcode/DerivedData/grocery_stores-dcyubhefhrcjhtcxbhldfpukdgdz/Build/Intermediates/grocery stores.build/Release-iphoneos/grocerystores.build/Objects-normal/armv7/grocery stores and /Users/teddy/Library/Developer/Xcode/DerivedData/grocery_stores-dcyubhefhrcjhtcxbhldfpukdgdz/Build/Intermediates/grocery stores.build/Release-iphoneos/grocery stores.build/Objects-normal/armv7/grocery stores have the same architectures (armv7) and can't be in the same fat output file
Command /usr/bin/lipo failed with exit code 1
I solved this issue by changing the value of the Valid Architecture found in Project > Build Settings > Architectures from the default "armv6 armv7" to "armv7". Hope this helps.
It's hard to see what exactly is happening without the command you are running. It looks to me like you are specifying the same input file twice, namely the arm7 version and lipo is telling you you can't add 2 arm7 versions of grocery stores to the universal file. Can you please enter the entire lipo command you are running? From the lipo man page:
-create
Take the input files (or file) and create one universal output file from them.
Do you possibly have the same file listed twice here?
Try changing your build target to a simulator build, clean and re-run.
In my case I used pods and oped projectFile instead of project workspace
In my case it was building a project on simulator in a release scheme, changed it to debug and it worked.

How Do I Get The Resource DLL Code Samples In The Windows SDKs To Compile And Run?

I am currently trying to build a Resource DLL on on Windows Server 2003 and 2008. I am currently working with the Resource DLL code samples supplied with the Windows SDKs, and I can't get them to work.
On Windows Server 2008 I succeeded compiling the Windows 7 SDK ClipBook Server sample, but couldn't get it to properly work in the cluster. When I insert the resource as a resource type to the cluster using "cluster restype /create /dll" it works, but the resource is listed with an unknown type instead of a ClipBook Server type, as I think it should have as it is the type defined in the Resource DLL's code.
I also succeed in creating a resource of that type, but I can never get it to go Online. I always get the error:
System error 5079 has occurred (0x000013d7).
The specified node does not support a resource of this type. This may be due to version inconsistencies or due to the absence of the resource DLL on this node.
And this is despite the fact that the resource is located on all the nodes in the cluster including the one I try to start the resource on.
On Windows Server 2003, I'm working with the Platform SDK version 5.2, and I can't even get the ClipBook Server Resource DLL code sample to compile. I always get MIDL1001 Error saying that it cannot open the file cluscfgserver.idl. I added the path of the file's location to the include path of the project. That didn't work. When I tried to hard-code the path of the file, I got several linker errors when trying to link with this file.
If anyone knows anything about any of these problems, I would appreciate any input.
Those examples are old and busted. Here are a few things I had to go through to get the similar "File Share Sample" to work:
Convert the project to x64 (supposedly 32 bit resources still work, but I haven't been able to verify that)
Add the module definition file (.def) to the linker input property page so that the Startup function is exposed
There were several spots in code where CompareString is used to check the resource type name and 0 is expected on success, but it actually returns CSTR_EQUAL (3).
This is probably why you get the "(Unknown Type)" name.
To register the resource extension, cluster.exe won't accept spaces in the dll name, so in my case I had to use cluster /REGADMINEXT:'FILESH~2.dll'
Only the Property Sheet extension interface is supported, everything else (context menu, wizards) has been removed as of Server 2008
Check the extension DLL stdafx.cpp sources for the Resource Type "ClipBook Server". It should be "ClipBook Server Sample": const WCHAR g_wszResourceTypeNames[] = L"ClipBook Server Sample\0"