收藏
回答

小程序首次进入分包页面提示"网络无法连接",必现

框架类型 问题类型 操作系统 操作系统版本 手机型号 微信版本
小程序 Bug iOS iOS17.5.1 iPhone 13pro 8.0.50

小程序首次进入分包页面提示"网络无法连接",必现

回答关注问题邀请回答
收藏

2 个回答

  • 社区技术运营专员-Jahozheng
    社区技术运营专员-Jahozheng
    07-11

    请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    07-11
    有用
    回复 5
    • Focus
      Focus
      07-15
      这种情况下必先,我写了个Demo,但是提示代码包大小限制,没法分享(可是详情见图片)。
      07-15
      回复
    • Focus
      Focus
      07-15
      只要代码包体积比较大,配置加载主包时的 preload 比较大的分包时必现,可以参考下面的 app.json


      {
        "pages": [
          "pages/index/index",
          "pages/log/index",
          "pages/other/index",
          "pages/other2/index",
          "pages/other3/index",
          "pages/other4/index",
          "pages/other5/index"
        ],
        "window": {
          "navigationBarTextStyle": "black",
          "navigationStyle": "custom"
        },
        "subPackages": [
          {
            "root": "subPackages/test",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about1",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about2",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about3",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about4",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about5",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about6",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about7",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about8",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about9",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about10",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about11",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about12",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about13",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about14",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about15",
            "pages": ["index"]
          },
          {
            "root": "subPackages/about16",
            "pages": ["index"]
          },
          {
            "root": "subPackages/my",
            "pages": ["index"]
          },
          {
            "root": "subPackages/community",
            "pages": ["index"]
          }
        ],
        "preloadRule": {
          "pages/index/index": {
            "network": "all",
            "packages": [
              "subPackages/my",
              "subPackages/about",
              "subPackages/about1",
              "subPackages/about2",
              "subPackages/about3",
              "subPackages/about4",
              "subPackages/about5",
              "subPackages/about6",
              "subPackages/about7",
              "subPackages/about8",
              "subPackages/community"
            ]
          }
        },
        "style": "v2",
        "renderer": "skyline",
        "rendererOptions": {
          "skyline": {
            "defaultDisplayBlock": true,
            "disableABTest": true,
            "sdkVersionBegin": "3.0.0",
            "sdkVersionEnd": "15.255.255"
          }
        },
        "componentFramework": "glass-easel",
        "sitemapLocation": "sitemap.json",
        "lazyCodeLoading": "requiredComponents"
      }
      07-15
      回复
    • 社区技术运营专员-Jahozheng
      社区技术运营专员-Jahozheng
      07-15回复Focus
      只有分包路径 分包体积不够大复现不了是么
      07-15
      回复
    • Focus
      Focus
      07-24回复社区技术运营专员-Jahozheng
      是的
      07-24
      回复
    • 社区技术运营专员-Jahozheng
      社区技术运营专员-Jahozheng
      07-24回复Focus
      那有没有线上的复现路径呢 我们也可以看下
      07-24
      回复
  • Focus
    Focus
    07-11

    体验版和线上环境的小程序都会出现

    07-11
    有用
    回复
登录 后发表内容