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
J YachJ Yach 

Build an Instant Notification App The 'cometd' static resource was not found. Check for typos.

When I try to verify the Subscribe to a Platform Event step I am getting the error:

Challenge Not yet complete... here's what's wrong:
The 'cometd' static resource was not found. Check for typos.

The thing is, I am getting the bear watch notifications.  Any idea as to why this error is occurring?

User-added image
Best Answer chosen by J Yach
Kyle NeithamerKyle Neithamer
It's definitely because the MIME type is text/plain rather than application/javascript. I cannot figure out how to change it though as there is no way to edit through the UI. I did hear you can change it in Eclipse.

All Answers

Alap MistryAlap Mistry
Hello J Yach,
Static resource is JavaScript fle. So MIME Type of static resource (cometd) will be "application/javascript". Check given below screenshot.

User-added image

If error is occur, then post here. If it is useful, then mark it as best answer (for close this thread).
Regards,
Alap Mistry
Kyle NeithamerKyle Neithamer
It's definitely because the MIME type is text/plain rather than application/javascript. I cannot figure out how to change it though as there is no way to edit through the UI. I did hear you can change it in Eclipse.
This was selected as the best answer
Kyle NeithamerKyle Neithamer

So I fixed it by pulling my trailhead org down into MavensMate and Sublime. In Sublime, edit 'cometd.resource-meta.xml' and change the 'contentType' node to 'application/javascript', i.e. <contentType>application/javascript</contentType>

Then via MavensMate, deploy back to the TH org and it passes. Pretty lame that it defaults to text/plain for a javascript file....

Alap MistryAlap Mistry
Hello Kyle Neithamer,
You can also delete that static resource and create another one. It is also another way to solve this issue, but you can solved this issue via MavensMate. Great!!!
Please mark above answer (your or my answer) as best answer for close this thread.
Regards,
Alap Mistry
J YachJ Yach
Thanks for the help everyone.  Editing the file in Mavensmate took care of my problem.
Akanksha JadhavAkanksha Jadhav
Error also occurs due to MIME type : 

To correct the mime type of the static resource within salesforce:
try trailhead using Chrome browser.
MIME type for uploaded resource might differ based on the browser being used to upload
Chrome - application/javascript
Firefox -application/x-javascript
IE 11- application/octet-stream
 
Bennett Montgomery 8Bennett Montgomery 8
On the Mac, Safari chooses the same MIME type as Firefox.  Opening Chrome on the Mac and updating the resource with the same file changes the file type to text/javascript which is acceptable to the 'Verify Step' button.