This didn't start as a blog entry. I originally typed it up as an E-mail to Anit Kumar, Adobe's rockstar support guy who offered to help me on Twitter. See, I'm trying to build a mobile app using ColdFusion 11 mobile technology to have a chance at winning the $1,000 prize from Adobe's little contest. If you didn't know about it, please forget about it-- I don't want any more competition :)
So after several hours of fiddling yesterday, I got a lot of the workflow understood and working but still have some major hang ups and questions. After I finished typing this E-mail to Anit, I thought to myself, "Self, why not make this conversation public so everyone can benifit from it?" There's precious little information about CFClient out there already and some people like Adam C has already expressed interest in hearing my experiences-- not that I expect to sell him on CFClient or anything :)
This is a little rambly and I apologize for that. I'll try to blog some more organized thoughts after I get this all working. So, without further ado... Anit, please reply here if you can just so everyone can benefit from the answers-- even if it means I'm a numbskull and did it all wrong.
Hi Anit, thanks for the reply on Twitter. I have been having a heck of a time just getting the expense tracker sample app to work on my Samsung Galaxy S4. I have read all the articles and docs, I could find that Ram put out and watched his getting started videos on YouTube.
I have run into a number of issues, but to keep things simple, I'll start at the beginning.
I have installed the PhoneGap shell app that is linked to from here:
I can access the application in a browser on http://localhost:8511/ but of course, the device APIs aren't available so it errors out.
I can load that URL in the PhoneGap shell application, but the application never runs. The initial HTML loads, but the "no expenses found" never shows. Connecting the built-in Weinre server by adding "?inspect" to the URL shows only the following console message:
deviceready has not fired after 5 seconds.
Channel not fired: onFileSystemPathsReady
There are lots of hits on the internet for that error, but nothing related to CFClient. The advice is usually to upgrade to a newer version of the Phonegap libraries but I don't know how to do that or if it is possible with the PhoneGap shell application.
My next attempt was to create an "inspect build" in builder via the remote phonegap service. I also added the Wienre inspection information to the project properties as Ram showed. This generated an APK file that I installed to my device.
Occasionally, when I open the app nothing will happen. The HTML loads, but the expense list never appears and the Weinre server connects, but the console shows nothing. I'm unclear on if I can debug an actually apk app.
Most of the time, the app will run. However, I get errors trying to get a picture from the camera API. I have placed console.log() calls all throughout the code, and the error happens when trying to copy the image to persistent storage. even though cfclient.file.exists() says the temporary file exists, and cfclient.file.directoryExists says the target directory exists, the copy operation always fails with the following message:
message: "File/Directory specified was not found"
type: "application"
Another question is why Ram didn't use the built-in cfclient.file.exists() functions, but instead put in try/catches everywhere. Is that necessary or just a coding preference?
Also, if i don't try/catch errors myself (like the cfclient.file.copy() one), the actual error that is put in the Weinre console is totally unhelpful. I just get errors like these:
processMessage failed: Message: F09 File1365576477 n12
processMessage failed: Error: [object Object]
processMessage failed: Stack: undefined
Are those errors expected with CFClient? Is it a requirement for me to try/catch all my code to be able to see the real error? Is there a way to get a stack trace at all?
Also, the throwerror param to cfclient.file.createDirectory() doesn't seem to work. The entire contents of the createApplicationFolder() method should be able to just be replaced with this:
var persistentfileSystem = cfclient.file.setFileSystem("persistent");
var appFolderPath = persistentfileSystem.root.fullPath + "/" + variables.appFolderName;
cfclient.file.createDirectory(appFolderPath,false);
return true;
But it still throws an error every time even though I'm passing in false for the throwError parameter.
I probably spent 5 hours trying to debug this yesterday just to get the expense tracker sample app working, but it is almost impossible to figure out what is going on. There is virtually no information on the Internet about the cfclient specific wrappers for the Phonegap APIs so all the many PhoneGap references I can find aren't of help.
Thanks for your help with all of this. Also, let me know if there is a forum I should be asking this on. Unfortunately, when I put feelers out on Twitter there appears to be little to no people out there with any experience in CFClient outside of the Adobe team.
Error translating markup widget: The content slug 'cfclient-series-list' does not exist lucee.runtime.exp.CustomTypeException: The content slug 'cfclient-series-list' does not exist
at lucee.runtime.tag.Throw._doStartTag(Throw.java:212)
at lucee.runtime.tag.Throw.doStartTag(Throw.java:201)
at throw_cfm$cf.udfCall(/throw.cfm:11)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.functions.system.CFFunction.call(CFFunction.java:109)
at widgets.contentstore_cfc$cf.udfCall(/contentbox/widgets/ContentStore.cfc:60)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1930)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:900)
at lucee.runtime.functions.dynamicEvaluation.Invoke.call(Invoke.java:49)
at models.content.renderers.widgetrenderer_cfc$cf.udfCall(/contentbox/models/content/renderers/WidgetRenderer.cfc:233)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:802)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at models.content.renderers.widgetrenderer_cfc$cf.udfCall(/contentbox/models/content/renderers/WidgetRenderer.cfc:32)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:802)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at models.content.renderers.widgetrenderer_cfc$cf.udfCall(/contentbox/models/content/renderers/WidgetRenderer.cfc:20)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1930)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:900)
at lucee.runtime.functions.dynamicEvaluation.Invoke.call(Invoke.java:49)
at system.web.context.interceptorstate_cfc$cf.udfCall2(/coldbox/system/web/context/InterceptorState.cfc:515)
at system.web.context.interceptorstate_cfc$cf.udfCall(/coldbox/system/web/context/InterceptorState.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:802)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at system.web.context.interceptorstate_cfc$cf.udfCall1(/coldbox/system/web/context/InterceptorState.cfc:360)
at system.web.context.interceptorstate_cfc$cf.udfCall(/coldbox/system/web/context/InterceptorState.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:802)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at system.web.context.interceptorstate_cfc$cf.udfCall1(/coldbox/system/web/context/InterceptorState.cfc:148)
at system.web.context.interceptorstate_cfc$cf.udfCall(/coldbox/system/web/context/InterceptorState.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1930)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at system.web.services.interceptorservice_cfc$cf.udfCall1(/coldbox/system/web/services/InterceptorService.cfc:201)
at system.web.services.interceptorservice_cfc$cf.udfCall(/coldbox/system/web/services/InterceptorService.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1930)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:900)
at lucee.runtime.functions.dynamicEvaluation.Invoke.call(Invoke.java:49)
at system.ioc.provider_cfc$cf.udfCall(/coldbox/system/ioc/Provider.cfc:110)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
at lucee.runtime.ComponentImpl.onMissingMethod(ComponentImpl.java:611)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:574)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747)
at models.content.basecontent_cfc$cf$8.udfCall8(/contentbox/models/content/BaseContent.cfc:1601)
at models.content.basecontent_cfc$cf$8.udfCall(/contentbox/models/content/BaseContent.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:785)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747)
at models.content.basecontent_cfc$cf$8.udfCall8(/contentbox/models/content/BaseContent.cfc:1574)
at models.content.basecontent_cfc$cf$8.udfCall(/contentbox/models/content/BaseContent.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747)
at models.system.cbhelper_cfc$cf.udfCall7(/contentbox/models/system/CBHelper.cfc:925)
at models.system.cbhelper_cfc$cf.udfCall(/contentbox/models/system/CBHelper.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747)
at modules.contentbox.themes._default.views._blogincludes_cfm$cf.call(/modules/contentbox/themes/default/views/_blogIncludes.cfm:11)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1034)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:926)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:907)
at system.web.rendererencapsulator_cfm$cf.call(/coldbox/system/web/RendererEncapsulator.cfm:54)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1034)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:926)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:918)
at lucee.runtime.tag.CFTag.doInclude(CFTag.java:319)
at lucee.runtime.tag.CFTag.cfmlStartTag(CFTag.java:245)
at lucee.runtime.tag.CFTag.doStartTag(CFTag.java:179)
at system.web.renderer_cfc$cf.udfCall1(/coldbox/system/web/Renderer.cfc:469)
at system.web.renderer_cfc$cf.udfCall(/coldbox/system/web/Renderer.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:785)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747)
at system.web.renderer_cfc$cf.udfCall1(/coldbox/system/web/Renderer.cfc:329)
at system.web.renderer_cfc$cf.udfCall(/coldbox/system/web/Renderer.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1930)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at system.web.renderer_cfc$cf.udfCall1(/coldbox/system/web/Renderer.cfc:149)
at system.web.renderer_cfc$cf.udfCall(/coldbox/system/web/Renderer.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1930)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at models.system.cbhelper_cfc$cf.udfCalld(/contentbox/models/system/CBHelper.cfc:2015)
at models.system.cbhelper_cfc$cf.udfCall(/contentbox/models/system/CBHelper.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747)
at modules.contentbox.themes._default.layouts.blog_cfm$cf.call(/modules/contentbox/themes/default/layouts/blog.cfm:9)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1034)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:926)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:907)
at system.web.rendererencapsulator_cfm$cf.call(/coldbox/system/web/RendererEncapsulator.cfm:54)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1034)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:926)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:918)
at lucee.runtime.tag.CFTag.doInclude(CFTag.java:319)
at lucee.runtime.tag.CFTag.cfmlStartTag(CFTag.java:245)
at lucee.runtime.tag.CFTag.doStartTag(CFTag.java:179)
at system.web.renderer_cfc$cf.udfCall1(/coldbox/system/web/Renderer.cfc:469)
at system.web.renderer_cfc$cf.udfCall(/coldbox/system/web/Renderer.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:802)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at system.web.renderer_cfc$cf.udfCall2(/coldbox/system/web/Renderer.cfc:697)
at system.web.renderer_cfc$cf.udfCall(/coldbox/system/web/Renderer.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1930)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at system.web.renderer_cfc$cf.udfCall1(/coldbox/system/web/Renderer.cfc:558)
at system.web.renderer_cfc$cf.udfCall(/coldbox/system/web/Renderer.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1930)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at system.frameworksupertype_cfc$cf.udfCall2(/coldbox/system/FrameworkSupertype.cfc:307)
at system.frameworksupertype_cfc$cf.udfCall(/coldbox/system/FrameworkSupertype.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:802)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at modules.contentbox.modules.contentbox_ui495.handlers.content_cfc$cf.udfCall(/modules/contentbox/modules/contentbox-ui/handlers/content.cfc:264)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:802)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at modules.contentbox.modules.contentbox_ui495.handlers.blog_cfc$cf.udfCall1(/modules/contentbox/modules/contentbox-ui/handlers/blog.cfc:214)
at modules.contentbox.modules.contentbox_ui495.handlers.blog_cfc$cf.udfCall(/modules/contentbox/modules/contentbox-ui/handlers/blog.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1930)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:900)
at lucee.runtime.functions.dynamicEvaluation.Invoke.call(Invoke.java:49)
at system.web.controller_cfc$cf.udfCall3(/coldbox/system/web/Controller.cfc:1197)
at system.web.controller_cfc$cf.udfCall(/coldbox/system/web/Controller.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:802)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at system.web.controller_cfc$cf.udfCall3(/coldbox/system/web/Controller.cfc:919)
at system.web.controller_cfc$cf.udfCall(/coldbox/system/web/Controller.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:802)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at system.web.controller_cfc$cf.udfCall3(/coldbox/system/web/Controller.cfc:658)
at system.web.controller_cfc$cf.udfCall(/coldbox/system/web/Controller.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1930)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:866)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1766)
at coldbox.system.bootstrap_cfc$cf.udfCall1(/coldbox/system/Bootstrap.cfc:292)
at coldbox.system.bootstrap_cfc$cf.udfCall(/coldbox/system/Bootstrap.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:785)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747)
at coldbox.system.bootstrap_cfc$cf.udfCall1(/coldbox/system/Bootstrap.cfc:509)
at coldbox.system.bootstrap_cfc$cf.udfCall(/coldbox/system/Bootstrap.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747)
at application_cfc$cf.udfCall(/Application.cfc:170)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
at lucee.runtime.listener.ModernAppListener.call(ModernAppListener.java:437)
at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:133)
at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2460)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2450)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2421)
at lucee.runtime.engine.Request.exe(Request.java:45)
at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1179)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1125)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:764)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Unknown Source)
Ram Kulkarni
Brad, as you know I don't work for Adobe anymore, so don't know the latest updates to the products. But since you pinged me on Twitter, I will tell you what I think could be an issue here.
I am not very sure, but the recent updates to ColdFusion 11 might have updated PhoneGap libraries that ship with the product and which are used by the shell app. The shell app in the link you mentioned was created with an older version of PhoneGap which may not now match with the libraries shipped with ColdFusion 11. Because of this deviceReady event of PG may not begetting fired.
If PG libraries were updated recently in CF 11, then the team might have released an update to the shell app too. You might want to use that.
Brad Wood
Thanks for the insight, Ram. That does indeed sound like it might be the reason the shell app doesn't work. I'm not sure if Adobe has a newer version. The one linked to on the Adobe site actually points to your personal server! I already pointed this out to Rakshith so Adobe can host it themselves internally.
Of course, even if that explains the failure of the shell app to run, it doesn't explain any of my issues copying files from the camera with a native APK file.
Adam Cameron
Cheers for writing this up, Brad. It serves as a great "here be dragons" warning for people, for one thing.
-- Adam
Me
Is this conversation continuing somewhere else?
Brad Wood
@Me, no I haven't heard back from any current Adobe employees. I can only assume they are still on holiday.
Steve Sommers
Hmmm. I installed and got Ram's CFMobileExpenseTracker application up and running a few months back. I'm just getting back into the CFClient development and I don't like dragons. I'm very interested to hear (read) what actually broke and what the solution is. I'm VERY concerned about application supportability and this thread scares me.
On a separate related but unrelated topic, anyone know of any good CFClient MVC examples? Most example apps I have found contain references to "an MVC structure would be better" but I have yet to find a MVC example with CFClient.
Brad Wood
@Steve, good to know the shell app used to work. That's probably more support for the theory that a recent internal Phonegap library update in CF11 has broken the shell app. Can you try it again?
I wouldn't be too crazy concerned yet-- that certainly wasn't the intention of my post. I'm willing to chalk a lot up to my own learning curve, but there's only so far i can go on some things without some help from Adobe. Also, I will point out that the Phonegap shell is probably not officially supported in any manner so I have rather low expectations for it.
The MVC question is a good one. I've actually thought about that one a lot, but I'm honestly not sure what it would look like. The order code has to be run is a little tricky, and the async nature makes it even tricker. For instance, I would have errors being caught by a catch block in a completely different method. I think that is because subsequent code after a client API call is added to the callbacks behind the scenes which doesn't preserve the same structure in the compiled code. I'll have to wrap my head more around how the CFClient flow works before I can ponder how to better add MVC structure. And quite honestly, I'm likely to not have the time to address that while banging out a submission for the contest.
Steve Sommers
I fired up my previously installed app. It prompted to update PhoneGap. I chose no just to make sure it still worked. It did. I then re-fired it up, selected update, it still worked. I closed all the apps and restarted just to make sure the updated PhoneGap was running, it all still worked.
Now I remember having difficulty getting it up and running the first time but for the life of me I cannot remember what I did as I also chalked it up to my learning curve. I guess I should have written whatever it was down.
Sorry I'm not more of a help. I'm a noob with all this mobile stuff.
Brad Wood
Was this an APK file you had built yourself, or the "PhoneGap shell" simply pointed to a ColdFusion 11 site running the code? It is the latter that won't run at all for me. I can get the former to run, but the file client API won't work when I try to take a picture.
Raymond Camden
In regards to seeing [object Object] in console.log, I don't think you will see this w/ complex data if you stop using Weinre, but just in case, you can always do this (imagine err is the error):
console.log(JSON.stringify(err));
I've used this in the past. But as I said on Twiter, Weinre should be avoided. It was very useful 2 years ago, but I'm surprised it was used for cfclient. (Well, CF11 is over a year old, so maybe that's why.)
Steve Sommers
The latter is what I have running. I have not even attempted the former. I just tried the camera functionality and it still works as well. The PhoneGap Shell states "This application is created with PhoneGap 3.3 libraries..."
Steve Sommers
Hey Brad. Just touching base to see if you had any success? For me, the more I play around with Ram's example, the less I like CFClient. I'm guessing that it is just a quick and dirty choice made when creating the sample app but I'm finding spaghetti galore (sorry Ram). There is an include with cffunctions defined, js files with functions, cfc's with functions, custom tags calling functions from most of the above, and some imbedded javascript within cfm files. This example may have been done this way to show all things possible but thus far I cannot find any more structured examples and I'm getting frustrated. Anyone having any better luck or links to other CFClient example apps?
Brad Wood
Good timing Steve. I've set the Expense Tracker aside for now and moved forward with my contest submission app. I just published my latest blog post detailing my progress including links to the code on GitHub and compiled APK. http://www.codersrevolution.com/blog/my-cfclient-proof-of-concept-and-gapdebug