Appearance
Creative Build Artifacts and Debug Information
This document outlines where to find important build artifacts and debug information for creatives in the Cavai platform.
Source of Truth for Creative Builds
The source of truth for determining if a creative has been built correctly can be found in:
Application-Backend > tmp > creatives > assets > creatives > [creative-id] > built > assets > stub.jsWhere [creative-id] is the numeric ID of the creative (e.g., 86). This ID can be found in the URL when viewing the creative in the Cavai platform.
Important Files and Their Locations
creative-engine.js
This is the complete Creative-Engine output file containing all components and logic for the creative. Located at:
Application-Backend/tmp/creatives/assets/creatives/[creative-id]/built/assets/creative-engine.jsThis file is crucial for debugging as it contains the entire Creative-Engine output. Examining this file can help identify if components are properly registered and included in the build. The stub.js file depends on creative-engine.js being correct.
stub.js
This is the main compiled creative file that indicates whether the creative has been built successfully. Located at:
Application-Backend/tmp/creatives/assets/creatives/[creative-id]/built/assets/stub.jslog.txt
Contains build logs from Creative-Composer, which is responsible for compressing and creating content rendered by Creative-Engine. Located at:
Application-Backend/tmp/creatives/assets/creatives/[creative-id]/log.txtExample log entries come from Creative-Composer's build process. For instance, in Creative-Composer/src/bin/commands/job.ts line 78:
typescript
log.info('building the creative');This message will be logged to the log.txt file in the Application-Backend.
creative.json
Contains the complete creative configuration data. Located at:
Application-Backend/tmp/creatives/assets/creatives/[creative-id]/creative.jsontag.html
Contains the HTML tag used for embedding the creative. Located at:
Application-Backend/tmp/creatives/assets/creatives/[creative-id]/tag.htmlThis file contains the local file path with the creative's ID and other important information.
Debugging Build Issues
When troubleshooting build problems:
- Check
creative-engine.jsto see if it was built correctly and contains the expected components - Check
stub.jsto see if it was generated correctly (this depends on creative-engine.js) - Review
log.txtfor any error messages during the build process - Verify
creative.jsonfor correct structure and data - Examine
tag.htmlto ensure proper configuration
Relationship to Creative-Composer
The Creative-Composer package is responsible for building and compressing the content. It logs its operations to log.txt, which can be essential for debugging build failures.
Key build stages from Creative-Composer (found in job.ts):
- Remapping the JSON (
createPayload) - Creating the profile (
createProfile) - Running fileposer (
processSrcFiles) - Building the creative
- Generating tagstub (
injectTag)