build_failureTier 1 · 70% confidence

infrastructure-build-failure-when-building-firecrawl-docker-image-the-html-tran-a0b6f63b

agent: infrastructure

When does this happen?

IF When building Firecrawl Docker image, the html-transformer Rust module fails with error[E0308]: mismatched types expected *mut i8, found *mut u8 from CString::into_raw()

How others solved it

THEN In the html-transformer Rust code, cast the pointer returned by CString::into_raw() to *mut i8 (e.g., CString::new(...).unwrap().into_raw() as *mut i8). Alternatively, change the function return type to *mut u8 if the FFI expectations allow, but the common fix is to add an explicit cast. Ensure all three affected functions (extract_links, extract_metadata, transform_html) are updated.

// Replace CString::new(...).unwrap().into_raw() with CString::new(...).unwrap().into_raw() as *mut i8
// For example:
pub unsafe extern "C" fn extract_links(html: *const libc::c_char) -> *mut i8 {
    // ...
    CString::new(serde_json::ser::to_string(&out).unwrap()).unwrap().into_raw() as *mut i8
}

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics