{"record":{"id":"1f4df57ecebed1b2","repo":"bumptech/glide","slug":"you-must-call-load-before-calling-into","errorCode":null,"errorMessage":"You must call #load() before calling #into()","messagePattern":"You must call #load\\(\\) before calling #into\\(\\)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"library/src/main/java/com/bumptech/glide/RequestBuilder.java","lineNumber":849,"sourceCode":"    return into(target, /* targetListener= */ null, Executors.mainThreadExecutorFront());\n  }\n\n  @NonNull\n  public <Y extends Target<TranscodeType>> Y into(\n      @NonNull Y target,\n      @Nullable RequestListener<TranscodeType> targetListener,\n      Executor callbackExecutor) {\n    return into(target, targetListener, /* options= */ this, callbackExecutor);\n  }\n\n  private <Y extends Target<TranscodeType>> Y into(\n      @NonNull Y target,\n      @Nullable RequestListener<TranscodeType> targetListener,\n      BaseRequestOptions<?> options,\n      Executor callbackExecutor) {\n    Preconditions.checkNotNull(target);\n    if (!isModelSet) {\n      throw new IllegalArgumentException(\"You must call #load() before calling #into()\");\n    }\n\n    Request request = buildRequest(target, targetListener, options, callbackExecutor);\n\n    Request previous = target.getRequest();\n    if (request.isEquivalentTo(previous)\n        && !isSkipMemoryCacheWithCompletePreviousRequest(options, previous)) {\n      // If the request is completed, beginning again will ensure the result is re-delivered,\n      // triggering RequestListeners and Targets. If the request is failed, beginning again will\n      // restart the request, giving it another chance to complete. If the request is already\n      // running, we can let it continue running without interruption.\n      if (!Preconditions.checkNotNull(previous).isRunning()) {\n        // Use the previous request rather than the new one to allow for optimizations like skipping\n        // setting placeholders, tracking and un-tracking Targets, and obtaining View dimensions\n        // that are done in the individual Request.\n        previous.begin();\n      }\n      return target;","sourceCodeStart":831,"sourceCodeEnd":867,"githubUrl":"https://github.com/bumptech/glide/blob/eb14a895d8f866e6a08c3e19d50ea3bd2c12c20a/library/src/main/java/com/bumptech/glide/RequestBuilder.java#L831-L867","documentation":"Glide's into() method on RequestBuilder checks the isModelSet flag, which is only set to true after a call to load() or one of its variants (load(String), load(Uri), load(File), etc.). Calling into() without first specifying what to load leaves the request with no data source, so Glide throws an IllegalArgumentException. The flag ensures the request pipeline always has a model to work with.","triggerScenarios":"Calling Glide.with(view).into(target) with no load() call in between. Reusing a RequestBuilder that was cloned before load() was called. Calling into() after clear() without re-invoking load().","commonSituations":"Chaining Glide.with(fragment).into(imageView) and forgetting the load(url) step. Extracting a RequestBuilder as a field and calling into() on it from multiple places where the load state is ambiguous. Refactoring that accidentally drops the load() call.","solutions":["Always chain load() before into(): Glide.with(context).load(url).into(target)","If you store a RequestBuilder, call load() on the instance immediately before into() each time","Use the full fluent chain in one expression to avoid missing the load step"],"exampleFix":"// before\nGlide.with(this).into(imageView);\n// after\nGlide.with(this).load(imageUrl).into(imageView);","handlingStrategy":"validation","validationCode":"// Ensure load() is always called before into() by using the fluent chain pattern\nGlide.with(context)\n    .load(url)       // sets isModelSet = true\n    .into(imageView); // safe to call now","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always chain load() and into() in a single fluent expression","If storing a RequestBuilder as a field, document that load() must be called before into()","Never call into() on a builder that came from clone() before load() has been called"],"tags":["glide","request-builder","api-misuse","load"],"backgroundTag":null,"analyzedSha":"eb14a895d8f866e6a08c3e19d50ea3bd2c12c20a","analyzedAt":"2026-08-14T01:43:54.821Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}