function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MikeGillMikeGill 

Cannot validate Creating Components challenge

Hello,

Getting this:
Challenge not yet complete... here's what's wrong: 
The component does not implement the 'appHostable' interface. That interface is required to add the component to Salesforce1.


My component looks like this
 
<aura:component implements="force:appHostable">
	<h1 class="headline">Hello Trailhead</h1>
</aura:component>

 
MikeGillMikeGill
Had the CSS incorrect. Solved. I will not share the fix in the interest of people learning.
Calvin SmithCalvin Smith
Have been very frustrated with the same error message despite having the force:appHostable interface implementation in place. You're telling us it's because of the CSS? Wow, what a misleading error message!  I've seen other posts where if the CSS wasn't correct, it reported the error correctly as being related to the CSS, not with a misleading message like this one.:(
Lewis DuLewis Du
I am having the same problem, dont know what is the issue was. 


<!-- helloWorld.cmp -->
<aura:component implements="force:appHostable">
    <h1>Hello Lightning Component!</h1>
    <div class="headline"></div>
</aura:component
___________________________________________
CSS 

.THIS.headline {
    font-size: 24px;
}




 
Calvin SmithCalvin Smith
@Lewis, Take a look at where you've applied your headline css class compared to where I've applied it in mine. Your <div> tags to which you've applied the "headline" class don't encapsulate anything. As such they don't serve any purpose or apply "headline" CSS to any content as there's nothing wrapped inside those divs.
Calvin SmithCalvin Smith
Oops, meant to say compared to where @Mike has applied his headline class.
Lewis DuLewis Du
Thanks for the reply Calvin,  eventhough I changed back to what mike has, its still giving me same Error message. 
did you get yours working? 
Calvin SmithCalvin Smith
Yes I did. I had an error in my CSS that was causing my problem. Your CSS looks correct to me. So if you're component code looks like @Mike code and you have the CSS you've posted, then your issue would seem to be someplace else. You may need to copy what you have to a text file, delete everything and create it again. Is it appearing in SF1 and working? Its possible that your updated component hasn't been added to your SF1 menu, etc for everything to work. I seem to recall needing to clear my cache to get everything to pass once I had it all fixed.
Ron KikerRon Kiker
@Lewis: ever figure this out?  there's not a lot going on within these particular .cmp and .css files; so it's frustrating trying to solve for this error message.  So wondering if you've solved it yet as it would seem you and I are in the same camp.
Calvin SmithCalvin Smith
@Ron If your Component code looks like @Mike code and your CSS looks like @Lewis, you should be all set. You may want to delete everything you have and try rebuilding it from scratch if it still doesn't work. I had to do that with one of my projects. I don't recall if this was the one, but it may have been. Hope this helps get you sorted
Sebastian KesselSebastian Kessel
Deleting and re-creating is what finally did it for me.
david boukhors 23david boukhors 23
Hello,

I had the exact same problem. Deleting the tab, then the whole component and recreating everything solved the problem.
Thank you

David
Oiswarja PyneOiswarja Pyne
Figured out the issue...the thng is most of are creating the css from MyLightningApp.app tab and hence the css is getting applied for the app not in the component!!
Make sure you're creating the css from MyLightningComponent or MyLightningComponent.cmp tab not from MyLightningApp or MyLightningApp.app tab.