Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PubSub: Amplify.addPluggable expect a category "Interactions" but AWSIoTProvider instance tells that Category is "PubSub" #10249

Closed
3 tasks done
setterlee opened this issue Aug 22, 2022 · 1 comment

Comments

@setterlee
Copy link

Before opening, please confirm:

JavaScript Framework

Vue

Amplify APIs

PubSub

Amplify Categories

Not applicable

Environment information

  System:
    OS: Linux 5.10 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
    Memory: 254.89 MB / 7.65 GB
    Container: Yes
    Shell: 3.1.0 - /usr/bin/fish
  Binaries:
    Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
  npmPackages:
    @aws-amplify/ui-components: ^1.9.4 => 1.9.6 
    @aws-sdk/client-iot: ^3.56.0 => 3.154.0 
    @capacitor/android: ^3.4.1 => 3.7.0 
    @capacitor/cli: ^3.4.1 => 3.7.0 
    @capacitor/core: ^3.4.1 => 3.7.0 
    @capacitor/device: ^1.1.2 => 1.1.2 
    @capacitor/ios: ^3.4.1 => 3.7.0 
    @capacitor/push-notifications: ^1.0.9 => 1.0.9 
    @chenfengyuan/vue-number-input: ^2.0.0-rc => 2.0.1 
    @maplibre/maplibre-gl-geocoder: ^1.2.0 => 1.4.2 
    @maplibre/maplibre-gl-style-spec:  14.1.0-dev 
    @tanker/file-reader: ^2.25.0 => 2.32.2 
    @vicons/carbon: ^0.12.0 => 0.12.0 
    @vicons/ionicons4: ^0.11.0 => 0.11.0 
    @vicons/ionicons5: ^0.11.0 => 0.11.0 
    @vicons/material: ^0.12.0 => 0.12.0 
    @vicons/tabler: ^0.11.0 => 0.11.0 
    @vue/cli-plugin-babel: ~4.5.0 => 4.5.19 
    @vue/cli-plugin-eslint: ~4.5.0 => 4.5.19 
    @vue/cli-plugin-router: ~4.5.0 => 4.5.19 
    @vue/cli-plugin-vuex: ~4.5.0 => 4.5.19 
    @vue/cli-service: ~4.5.0 => 4.5.19 
    @vue/compiler-sfc: ^3.0.0 => 3.2.37 (2.7.9)
    @vue/eslint-config-prettier: ^6.0.0 => 6.0.0 
    @vuepic/vue-datepicker: ^3.2.2 => 3.4.6 
    amplify-ui-components-loader:  undefined ()
    aws-amplify: ^4.3.14 => 4.3.32 
    babel-eslint: ^10.1.0 => 10.1.0 
    braintree-web-drop-in: ^1.32.1 => 1.33.4 
    constant-case: ^3.0.4 => 3.0.4 
    core-js: ^3.6.5 => 3.24.1 
    demo:  0.1.0 
    eslint: ^6.7.2 => 6.8.0 
    eslint-plugin-prettier: ^3.3.1 => 3.4.1 
    eslint-plugin-vue: ^7.0.0 => 7.20.0 
    geolib: ^3.3.3 => 3.3.3 
    js-big-decimal: ^1.3.5 => 1.3.5 
    kebab-case: ^1.0.1 => 1.0.1 
    maplibre-gl: ^1.15.2 => 1.15.3 
    maplibre-gl-js-amplify: ^1.2.1 => 1.6.0 
    mime: ^3.0.0 => 3.0.0 (1.6.0, 2.6.0)
    naive-ui: ^2.32.1 => 2.32.2 
    prettier: ^2.2.1 => 2.7.1 
    sass: ^1.45.1 => 1.54.5 
    sass-loader: ^10.2.0 => 10.3.1 
    title-case: ^3.0.3 => 3.0.3 
    vfonts: ^0.1.0 => 0.1.0 
    vue: ^3.2.24 => 3.2.37 (2.7.9)
    vue-advanced-chat: https://github.com/antoine92190/vue-advanced-chat/tarball/next => 1.5.7 
    vue-browser-geolocation: ^1.8.0 => 1.8.0 
    vue-draggable-next: ^2.1.1 => 2.1.1 
    vue-loader:  undefined (16.8.3)
    vue-loader-v16: ^16.0.0-beta.5.4 => 16.0.0-beta.5.4 
    vue-router: ^4.0.0-0 => 4.1.3 
    vuex: ^4.0.0-0 => 4.0.2 
  npmGlobalPackages:
    @aws-amplify/cli: 9.2.1
    all-the-package-names: 2.0.170
    npm: 6.14.13
    serverless: 2.72.2


Describe the bug

We added PubSub to our project with the aws-amplify 4.3.14 and now the current version have a validacion in the Amplify.addPluggable function that check category's pluggable, the AWSIoTProvider instances said that the category is PubSub but he addPluggable function expect "Interactions".

Expected behavior

We expecte that AWSIoTProvider pluggable could be added to our app.

Reproduction steps

  1. In a base project, add the PubSub pluggable as the docs said:

Amplify.addPluggable(new AWSIoTProvider({ aws_pubsub_region: 'us-east-1', aws_pubsub_endpoint: 'wss://xxxxxxxxxx-ats.iot.us-east-1.amazonaws.com/mqtt', }));

  1. Run the project
  2. Try to load the main page.

Code Snippet

import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import { Amplify } from "aws-amplify";
import aws_exports from "./aws-exports";
import {
  applyPolyfills,
  defineCustomElements,
} from "@aws-amplify/ui-components/loader";
import { AWSIoTProvider } from '@aws-amplify/pubsub';
Amplify.configure(aws_exports);
Amplify.addPluggable(new AWSIoTProvider({
  aws_pubsub_region: 'us-east-1',
  aws_pubsub_endpoint: 'wss://xxxxxxxx-ats.iot.us-east-1.amazonaws.com/mqtt',
}));
applyPolyfills().then(() => {
  defineCustomElements(window);
});

createApp(App).use(store).use(router).mount("#app");

Log output


  | InteractionsClass.addPluggable | @ | Interactions.js?b597:109
-- | -- | -- | --
  | eval | @ | Amplify.js?7d03:95
  | AmplifyClass.addPluggable | @ | Amplify.js?7d03:92
  | eval | @ | main.js?56d7:13
  | ./src/main.js | @ | app.js:2001
  | __webpack_require__ | @ | app.js:854
  | fn | @ | app.js:151
  | 1 | @ | app.js:2398
  | __webpack_require__ | @ | app.js:854
  | checkDeferredModules | @ | app.js:46
  | (anonymous) | @ | app.js:994
  | (anonymous) | @ | app.js:997

aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

@ashwinkumar6
Copy link
Member

Thank you for reporting the issue, this has been resolved in the version 4.3.33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants